UNPKG

@intlayer/config

Version:

Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.

17 lines (15 loc) 634 B
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); //#region src/utils/stringFormatter/camelCaseToSentence.ts /** * Convert a string to sentence case * e.g. 'my-new-component' → 'My new component' */ const camelCaseToSentence = (value) => { if (!value) return ""; if (typeof value !== "string") return ""; const withSpaces = value.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2"); return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase(); }; //#endregion exports.camelCaseToSentence = camelCaseToSentence; //# sourceMappingURL=camelCaseToSentence.cjs.map