We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b668a9 commit 06ca85dCopy full SHA for 06ca85d
src/shared/util.js
@@ -99,9 +99,10 @@ export const capitalize = cached((str: string): string => {
99
/**
100
* Hyphenate a camelCase string.
101
*/
102
-const hyphenateRE = /([a-z\d])([A-Z])/g
+const hyphenateRE = /([^-])([A-Z])/g
103
export const hyphenate = cached((str: string): string => {
104
return str
105
+ .replace(hyphenateRE, '$1-$2')
106
.replace(hyphenateRE, '$1-$2')
107
.toLowerCase()
108
})
0 commit comments