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.
2 parents ca296f1 + 0b7b1c3 commit dd5d7c7Copy full SHA for dd5d7c7
libs/json-api-nestjs-sdk/src/lib/utils/index.ts
@@ -13,9 +13,7 @@ export function snakeToCamel(str: string): string {
13
}
14
15
export function camelToKebab(str: string): string {
16
- return str
17
- .replace(/((?<=[a-z\d])[A-Z]|(?<=[A-Z\d])[A-Z](?=[a-z]))/g, '-$1')
18
- .toLowerCase();
+ return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
19
20
21
export function getTypeForReq(str: string): string {
0 commit comments