awilix
Version:
Extremely powerful dependency injection container.
14 lines (13 loc) • 576 B
TypeScript
/**
* Hyperoptimized camelCase conversion.
*
* Single-pass, zero-regex, zero-allocation (beyond the result string).
* Splits on non-alphanumeric separators and case transitions:
* - lowercase/digit followed by uppercase (e.g. fooBar → foo|Bar)
* - uppercase followed by uppercase+lower (e.g. HTMLParser → HTML|Parser)
*
* First word is lowercased; subsequent words are capitalized (first char
* uppercased, rest lowercased). A subsequent word that starts with a digit
* is prefixed with '_'.
*/
export declare function camelCase(input: string): string;