@akala/core
Version:
32 lines (31 loc) • 1.17 kB
TypeScript
/**
* Converts a string to camelCase format.
* @param s - The input string to convert.
* @returns The camelCased string.
* @example toCamelCase('hello_world') // 'helloWorld'
*/
export declare function toCamelCase(s: string, separators?: string): string;
export declare const defaultSeparators = "- _/";
export declare const defaultCaseRegex: RegExp;
export declare const defaultSepRegex: RegExp;
/**
* Converts a string to PascalCase format.
* @param s - The input string to convert.
* @returns The PascalCased string.
* @example toPascalCase('hello-world') // 'HelloWorld'
*/
export declare function toPascalCase(s: string): string;
/**
* Converts a string to kebab-case format.
* @param s - The input string to convert.
* @returns The kebab-cased string.
* @example toKebabCase('helloWorld') // 'hello-world'
*/
export declare function toKebabCase(s: string, separators?: string): string;
/**
* Converts a string to snake_case format.
* @param s - The input string to convert.
* @returns The snake_cased string.
* @example toSnakeCase('helloWorld') // 'hello_world'
*/
export declare function toSnakeCase(s: string, separators?: string): string;