Yet another framework syndrome
| Name | Date | URL | Stars |
|---|---|---|---|
| Jake | April 2010 | https://github.com/mde/jake | 1000 |
| Brunch | January 2011 | http://brunch.io/ | 3882 |
| const REG_HEX = /(^#?[0-9A-F]{6}$)|(^#?[0-9A-F]{3}$)/i; | |
| /* | |
| * rgb字符串解析 | |
| * accepts: #333 #accded (without # is also fine) | |
| * not accept yet: rgb(), rgba() | |
| */ | |
| function parseRGB(str){ | |
| if(typeof str === 'string' && REG_HEX.test(str) ){ | |
| str = str.replace('#', ''); |
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
Yet another framework syndrome
| Name | Date | URL | Stars |
|---|---|---|---|
| Jake | April 2010 | https://github.com/mde/jake | 1000 |
| Brunch | January 2011 | http://brunch.io/ | 3882 |
| /* 后端数据 */ | |
| var data = { | |
| "10;20;30": { | |
| price: 5, | |
| count: 1 | |
| }, | |
| "10;20;31": { | |
| price: 10, | |
| count: 2 | |
| }, |