typia
Version:
Superfast runtime validators with only one line
1 lines • 676 B
Source Map (JSON)
{"version":3,"file":"_notationKebab.mjs","names":[],"sources":["../../src/internal/_notationKebab.ts"],"sourcesContent":["import { _notationSnake } from \"./_notationSnake\";\n\nexport const _notationKebab = (str: string): string => {\n let snaked: string = _notationSnake(str);\n let prefix: string = \"\";\n while (snaked.startsWith(\"_\")) {\n prefix += \"_\";\n snaked = snaked.substring(1);\n }\n return `${prefix}${snaked.replaceAll(\"_\", \"-\")}`;\n};\n"],"mappings":";;AAEA,MAAa,kBAAkB,QAAwB;CACrD,IAAI,SAAiB,eAAe,GAAG;CACvC,IAAI,SAAiB;CACrB,OAAO,OAAO,WAAW,GAAG,GAAG;EAC7B,UAAU;EACV,SAAS,OAAO,UAAU,CAAC;CAC7B;CACA,OAAO,GAAG,SAAS,OAAO,WAAW,KAAK,GAAG;AAC/C"}