UNPKG

@ng-doc/core

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

14 lines 373 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.kebabCase = kebabCase; /** * * @param str */ function kebabCase(str) { return (str ?.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g) ?.map((part) => part.toLowerCase()) ?.join('-') ?? ''); } //# sourceMappingURL=kebab-case.js.map