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 5a3a484 commit 6907133Copy full SHA for 6907133
src/utils.ts
@@ -6,8 +6,7 @@ import type {
6
} from './types';
7
8
const camelToKebab = (string: string) => string
9
- .replaceAll(/([a-z])([A-Z])/g, '$1-$2')
10
- .replaceAll(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
+ .replaceAll(/(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/g, '-')
11
.toLowerCase();
12
13
const { hasOwnProperty } = Object.prototype;
0 commit comments