{"version":3,"file":"_notationKebab.mjs","names":[],"sources":["../../src/internal/_notationKebab.ts"],"sourcesContent":["import { _notationSnake } from \"./_notationSnake\";\n\n/**\n * Convert a key to kebab-case through its snake_case form, keeping leading\n * underscores.\n *\n * @evidence contracts/common.md#principled-implementation The snake_case form is derived first and every underscore after the leading ones becomes a hyphen, so word boundaries are those of the snake conversion.\n * @evidence contracts/common.md#clear-and-simple-design One function over `_notationSnake`.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts No second boundary algorithm exists.\n * @evidence contracts/common.md#meaningful-documentation A comment states the two-step derivation and the preserved prefix.\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":";;;;;;;;;;;AAWA,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"}