@dulysse1/better-node
Version:
Improve Node types & add object properties
12 lines (11 loc) • 351 B
TypeScript
interface String {
/**
* @from `@dulysse1/better-node`
* ### Capitalize your string
* @param firstChar Does the first character have to be capitalized ?
* @default true
* @param sep Your capitalize separator
* @returns {string} Your string capitalized
*/
capitalized<T extends "-" | "_" | " ">(sep?: T, firstChar?: boolean): string;
}