Skip to content

Commit

Permalink
add additional replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Benbentwo committed Jul 27, 2023
1 parent cc99cda commit c4a4edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operations/kebabcase.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export function kebabcase(str: string): string {
return str.replace(/([a-z])([A-Z])/g, "$1-$2")
.replace(/[\s_/]+/g, '-')
.toLowerCase();
.toLowerCase().replace('/', '-');
}

0 comments on commit c4a4edc

Please sign in to comment.