@monstermann/fn
Version:
A utility library for TypeScript.
25 lines (23 loc) • 578 B
TypeScript
import { SnakeCase } from "string-ts";
//#region src/string/snakeCase.d.ts
/**
* `snakeCase(target)`
*
* Converts `target` string to snake_case format.
*
* ```ts
* snakeCase("hello world"); // "hello_world"
* snakeCase("helloWorld"); // "hello_world"
* ```
*
* ```ts
* pipe("hello world", snakeCase()); // "hello_world"
* pipe("helloWorld", snakeCase()); // "hello_world"
* ```
*/
declare const snakeCase$1: {
(): <T extends string>(target: T) => SnakeCase<T>;
<T extends string>(target: T): SnakeCase<T>;
};
//#endregion
export { snakeCase$1 as snakeCase };