UNPKG

@ukbhra/common-utils

Version:

A collection of reusable utility functions for string, object, validation, and general operations in Node.js projects.

15 lines 995 B
export declare const capitalize: (str: string) => string; export declare const camelToSnake: (str: string) => string; export declare const snakeToCamel: (str: string) => string; export declare const truncate: (str: string, length: number) => string; export declare const escapeRegex: (str: string) => string; export declare const slugify: (str: string) => string; export declare const isEmpty: (str: string | null | undefined) => boolean; export declare const padLeft: (str: string, length: number, char?: string) => string; export declare const padRight: (str: string, length: number, char?: string) => string; export declare const removeWhitespace: (str: string) => string; export declare const reverse: (str: string) => string; export declare const contains: (str: string, substring: string) => boolean; export declare const startsWith: (str: string, prefix: string) => boolean; export declare const endsWith: (str: string, suffix: string) => boolean; //# sourceMappingURL=stringUtil.d.ts.map