function cached (fn) { var cache = Object.create(null) return function cachedFn (str) { var hit = cache[str] return hit || (cache[str] = fn(str)) } }var hyphenateRE = /([^-])([A-Z])/gvar hyphenate = cached(function (str) { return str .replace(hyphenateRE, '$1-$2') .replace(hyphenateRE, '$1-$2') .toLowerCase() })
慕村9548890
相关分类