(fn)
| 7 | const console = getConsole(); |
| 8 | |
| 9 | function cached(fn) { |
| 10 | const cache = Object.create(null); |
| 11 | return function cachedFn(str) { |
| 12 | const hit = cache[str]; |
| 13 | return hit || (cache[str] = fn(str)); |
| 14 | }; |
| 15 | } |
| 16 | |
| 17 | const regex = /-(\w)/g; |
| 18 | const camelize = cached(str => |