UNPKG

typedash

Version:

modern, type-safe collection of utility functions

23 lines (20 loc) 654 B
import { CamelCase as CamelCase$1 } from 'type-fest'; /** * Changes the casing of a string to kebab case. * @param string The input string to change the casing of. * @returns A new string with the casing changed to kebab case. * @example * ```ts * camelCase('fooBar') // 'fooFar' * camelCase('foo bar') // 'fooBar' * camelCase('foo-bar') // 'fooBar' * camelCase('fooBar42') // 'fooBar42' * ``` */ declare function camelCase<S extends string>(string: S): CamelCase<S>; /** * Changes the casing of a string to camel case. * @see {@link camelCase}. */ type CamelCase<S extends string> = CamelCase$1<S>; export { type CamelCase, camelCase };