@monstermann/fn
Version:
A utility library for TypeScript.
22 lines • 510 B
TypeScript
//#region src/string/capitalize.d.ts
/**
* `capitalize(target)`
*
* Capitalizes the first letter of `target` string.
*
* ```ts
* capitalize("hello world"); // "Hello world"
* capitalize("hello"); // "Hello"
* ```
*
* ```ts
* pipe("hello world", capitalize()); // "Hello world"
* pipe("hello", capitalize()); // "Hello"
* ```
*/
declare const capitalize: {
(): <T extends string>(target: T) => Capitalize<T>;
<T extends string>(target: T): Capitalize<T>;
};
//#endregion
export { capitalize };