Skip to content

Commit 4d5c03a

Browse files
authored
Remove hyphenate cache (#37)
1 parent a4afcad commit 4d5c03a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/basic/hyphenate.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,12 @@ const prefixAndLowerCase = char => `-${char.toLowerCase()}`;
2222
* As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
2323
* is converted to `-ms-`.
2424
*/
25-
export const hyphenate = (name, { cache }) => {
26-
const cachedName = cache[name];
27-
if (cachedName) {
28-
return cachedName;
29-
}
30-
31-
return (cache[name] = uppercaseCheck.test(name)
25+
export const hyphenate = name => {
26+
return uppercaseCheck.test(name)
3227
? name
3328
.replace(uppercasePattern, prefixAndLowerCase)
3429
.replace(msPattern, "-ms-")
35-
: name);
30+
: name;
3631
};
3732

3833
export default hyphenate;

0 commit comments

Comments
 (0)