UNPKG

camote-utils

Version:

A comprehensive TypeScript utility library featuring advanced string and number formatting, data structures, and algorithms

25 lines (24 loc) 1.8 kB
export declare const capitalize: (str: string) => string; export declare const truncate: (str: string, length: number, ellipsis?: string) => string; export declare const toCamelCase: (str: string) => string; export declare const toKebabCase: (str: string) => string; export declare const toSnakeCase: (str: string) => string; export declare const slugify: (str: string) => string; export declare const slugifyRevert: (str: string) => string; export declare const wordCount: (str: string) => number; export declare const format: (template: string, values: Record<string, string | number>) => string; export declare const reverse: (str: string) => string; export declare const clean: (str: string) => string; export declare const pluralize: (word: string, count?: number, customPlural?: string) => string; export declare const toUpperCase: (str: string, locale?: string) => string; export declare const toLowerCase: (str: string, locale?: string) => string; export declare const chopStart: (str: string, count?: number) => string; export declare const chopEnd: (str: string, count?: number) => string; export declare const capitalizeWords: (str: string) => string; export declare const mask: (str: string, maskChar?: string, visibleCount?: number, position?: "start" | "end", active?: boolean) => string; export declare const pad: (str: string, length: number, char?: string, position?: "start" | "end" | "both") => string; export declare const trim: (str: string) => string; export declare const explode: (str: string, delimiter: string, limit?: number) => string[]; export declare const toUnicodes: (str: string, exclude?: string | string[]) => string; export declare const toHtmlEntities: (str: string, exclude?: string | string[]) => string; export declare const swapCase: (str: string) => string;