UNPKG

@devlander/utils

Version:

Comprehensive JavaScript and TypeScript utilities for seamless development. Includes object manipulation, data validation, and more.

15 lines (14 loc) 392 B
/** * Capitalizes the first letter of a string. * * ✅ Works in Node.js, React, and React Native. * * @example * capitalize("hello world") // "Hello world" * capitalize("WORLD") // "WORLD" * capitalize("") // "" * * @param str - The input string to capitalize * @returns A new string with the first letter capitalized */ export declare const capitalize: (str: string) => string;