UNPKG

@umbraco/json-models-builders

Version:
41 lines (40 loc) 1.34 kB
export declare class AliasHelper { /** * Uses Camelize npm library to generate a safe alias from a string * that may contain spaces and dashes etc * * @param {string} text Input string * @returns {string} A camelcased string that starts with 'a' and ends with 'a' * @see {@link https://www.npmjs.com/package/camelize} */ static toSafeAlias(text: string): string; /** * Camel cases a string by calling the toCamelCase() method * * @param {string} text Input string * @returns {string} A camelcased string */ static toAlias(text: string): string; /** * Capatilze a string * * @param {string} text Input string * @returns {string} A capatilized string, of the first character only */ static capitalize(text: string): string; /** * Convert a sentence into camelCase * `toCamelCase('My aWesome Example')` would return `myAwesomeExample` * * @param {string} sentenceCase Input string * @returns {string} A camel cased string */ static toCamelCase(sentenceCase: string): string; /** * Removes dashes from UUID string * * @param {string} uuid A string representing a UUID * @returns {string} UUID without dashes */ static uuidToAlias(uuid: string): string; }