Skip to content

Commit a1d24c3

Browse files
author
Simon he
committed
chore: add hyphenate
1 parent b213ad3 commit a1d24c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/hyphenate.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function hyphenate(s: string): string {
2+
return s.replace(/([A-Z])/g, '-$1').toLowerCase()
3+
}

0 commit comments

Comments
 (0)