UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

18 lines (17 loc) 374 B
/** * Converts the first character of `string` to upper case and the remaining * to lower case. * * @since 5.3.0 * @category String * @param s The string to capitalize. * @returns Returns the capitalized string. * @example * * ```js * capitalize('FRED') * // => 'Fred' * ``` */ export declare function capitalize(s: string): string; export default capitalize;