/** * Runtime string utility functions that mirror the TypeScript utility types */ import type { CamelCaseIdentifier, PrettyCamelCase, ValidIdentifier } from './types/camelCase.types'; /** * Remove leading separators from a string */ export declare function removeLeadingSeparators(str: string): string; /** * Split a string by separators (space, dash, underscore, dot, slash, colon) */ export declare function splitBySeparators(str: string): string[]; /** * Remove all non-alphanumeric characters from a string */ export declare function removeNonAlphanumeric(str: string): string; /** * Remove leading numbers from a string to make it a valid identifier */ export declare function removeLeadingNumbers(str: string): string; /** * Capitalize the first letter of a string */ export declare function capitalize(str: string): string; /** * Convert the first letter to lowercase */ export declare function uncapitalize(str: string): string; /** * Convert a string to a valid TypeScript identifier in camelCase * Always returns a string, defaulting to the input if transformation fails * * @param str - The input string to transform * @returns The camelCase identifier or the original string if transformation fails * * @example * ```typescript * toCamelCaseIdentifier("hello-world"); // "helloWorld" * toCamelCaseIdentifier("my_var_name"); // "myVarName" * toCamelCaseIdentifier("some.property.name"); // "somePropertyName" * toCamelCaseIdentifier("123invalid"); // "invalid" * toCamelCaseIdentifier("hello world"); // "helloWorld" * toCamelCaseIdentifier("API-Key"); // "aPIKey" * toCamelCaseIdentifier("/organization/base"); // "organizationBase" * ``` */ export declare function toCamelCaseIdentifier(str: T): CamelCaseIdentifier; /** * Pretty camelCase conversion that handles abbreviations more intuitively * Always returns a string, defaulting to the input if transformation fails * * @param str - The input string to transform * @returns The pretty camelCase identifier or the original string if transformation fails * * @example * ```typescript * toPrettyCamelCase("API-Key"); // "apiKey" * toPrettyCamelCase("HTTP-Response"); // "httpResponse" * toPrettyCamelCase("user-ID"); // "userId" * toPrettyCamelCase("get-user-by-id"); // "getUserById" * toPrettyCamelCase("/organization/base"); // "organizationBase" * ``` */ export declare function toPrettyCamelCase(str: T): PrettyCamelCase; /** * Alternative implementation using a more comprehensive approach * for complex cases with better handling of edge cases */ export declare function toValidIdentifier(str: T): ValidIdentifier; /** * Check if a string is a valid JavaScript/TypeScript identifier */ export declare function isValidIdentifier(str: string): boolean; /** * Get detailed information about the transformation process * Useful for debugging and understanding how the transformation works */ export declare function getTransformationInfo(str: string): { original: string; withoutLeadingSeparators: string; parts: string[]; camelCase: string; prettyCamelCase: string; withoutLeadingNumbers: string; prettyCamelCaseWithoutLeadingNumbers: string; isValid: boolean; }; //# sourceMappingURL=camelCase.d.ts.map