UNPKG

dev-utils-plus

Version:

Type-safe utility functions for JavaScript/TypeScript: string, array, object, date, validation, crypto, format, math

48 lines 1.34 kB
/** * String utility functions for common web development tasks */ /** * Capitalizes the first letter of a string */ export declare function capitalize(str: string): string; /** * Converts a string to camelCase */ export declare function toCamelCase(str: string): string; /** * Converts a string to kebab-case */ export declare function toKebabCase(str: string): string; /** * Converts a string to snake_case */ export declare function toSnakeCase(str: string): string; /** * Truncates a string to a specified length and adds ellipsis */ export declare function truncate(str: string, length: number, suffix?: string): string; /** * Removes HTML tags from a string */ export declare function stripHtml(html: string): string; /** * Generates a random string of specified length */ export declare function generateRandomString(length: number, charset?: string): string; /** * Checks if a string is a valid email address */ export declare function isValidEmailString(email: string): boolean; /** * Counts the number of words in a string */ export declare function wordCount(str: string): number; /** * Reverses a string */ export declare function reverse(str: string): string; /** * Checks if a string is a palindrome */ export declare function isPalindrome(str: string): boolean; //# sourceMappingURL=index.d.ts.map