super-utils-plus
Version:
A superior alternative to Lodash with improved performance, TypeScript support, and developer experience
20 lines (19 loc) • 352 B
TypeScript
/**
* Converts string to snake case.
*
* @param string - The string to convert
* @returns The snake cased string
*
* @example
* ```ts
* snakeCase('Foo Bar');
* // => 'foo_bar'
*
* snakeCase('fooBar');
* // => 'foo_bar'
*
* snakeCase('--FOO-BAR--');
* // => 'foo_bar'
* ```
*/
export declare function snakeCase(string: string): string;