typia
Version:
Superfast runtime validators with only one line
15 lines • 523 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._notationKebab = void 0;
const _notationSnake_1 = require("./_notationSnake");
const _notationKebab = (str) => {
let snaked = (0, _notationSnake_1._notationSnake)(str);
let prefix = "";
while (snaked.startsWith("_")) {
prefix += "_";
snaked = snaked.substring(1);
}
return `${prefix}${snaked.replaceAll("_", "-")}`;
};
exports._notationKebab = _notationKebab;
//# sourceMappingURL=_notationKebab.js.map