UNPKG

@azizbecha/strkit

Version:

strkit is a utility library offering a collection of essential string functions including validation, case conversion, truncation, and more. Ideal for both JavaScript and TypeScript developers to simplify string operations in their applications.

10 lines (9 loc) 268 B
/** * Capitalizes the first letter of the input string. * @param str - The string to capitalize. * @returns The string with the first letter capitalized. * * @example * capitalize('hello'); // 'Hello' */ export default function capitalize(str: string): string;