textconvert
Version:
Public library to convert text into many conventions and formats.
33 lines (32 loc) • 1.16 kB
TypeScript
/**
* Convert a string from any convention to Camel Case convention.
* @param text A string to be converted to Camel Case.
* @returns A string in camelCase convention.
* @example
* camelCase('hello world'); // 'helloWorld'
*/
export declare function camelCase(text: string): string;
/**
* Convert a string from any convention to Pascal Case convention.
* @param text A string to be converted to Camel Case.
* @returns A string in PascalCase convention.
* @example
* pascalCase('hello world'); // 'HelloWorld'
*/
export declare function pascalCase(text: string): string;
/**
* Convert a string from any convention to Snake Case convention.
* @param text A string to be converted to Snake Case.
* @returns A string in snake_case convention.
* @example
* snakeCase('hello world'); // 'hello_world'
*/
export declare function snakeCase(text: string): string;
/**
* Convert a string from any convention to Kebab Case convention.
* @param text A string to be converted to Kebab Case.
* @returns A string in kebab-case convention.
* @example
* kebabCase('hello world'); // 'hello-world'
*/
export declare function kebabCase(text: string): string;