Skip to content

Commit 8960548

Browse files
author
Simon he
committed
chore: add camelize
1 parent cea88c2 commit 8960548

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/camelize.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function camelize(s: string): string {
2+
return s.replace(/-(\w)/g, (all, letter) => letter.toUpperCase())
3+
}

0 commit comments

Comments
 (0)