We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c750f95 commit 31b1e31Copy full SHA for 31b1e31
src/services/naming-conventions.js
@@ -2,7 +2,7 @@ const kebabCase = (input) => {
2
return input
3
.trim()
4
.replace(/[ _]/g, '-') // from snake_case (or spaces)
5
- .replace(/([a-z\d])([A-Z])/g, '$1-$2') // from PascalCase or camelCase
+ .replace(/([a-z])([A-Z])/g, '$1-$2') // from PascalCase or camelCase
6
.replace(/(\d[A-Z]*)([A-Z])/g, '$1-$2') // handling numbers followed by letters
7
.toLowerCase()
8
.replace(/-+/g, '-') // remove duplicate dashes
0 commit comments