@intlayer/config
Version:
Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.
14 lines (12 loc) • 507 B
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
//#region src/utils/stringFormatter/camelCaseToKebabCase.ts
/**
* Convert a string to kebab-case
* e.g. "MyNewComponent" => "my-new-component"
*/
const camelCaseToKebabCase = (str) => {
return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
};
//#endregion
exports.camelCaseToKebabCase = camelCaseToKebabCase;
//# sourceMappingURL=camelCaseToKebabCase.cjs.map