UNPKG

apphouse

Version:

Component library for React that uses observable state management and theme-able components.

50 lines (49 loc) 1.64 kB
/** * Force first letter uppercase on a word * @param string string * @returns */ export declare const makeFirstLetterUppercase: (string: string) => string; /** * Ensure all characters in the string are lowercase * @param str string to be encoded * @returns */ export declare const ensureAllLowerCase: (str?: any) => any; /** * Make string camelcase * all words start with uppercase except the first * @param str string to camelcaseify * @returns */ export declare const camelcaseify: (str: string) => string; export declare class StringUtils { static camelcaseify: (str: string) => string; static ensureAllLowerCase: (str?: any) => any; static makeFirstLetterUppercase: (string: string) => string; /** * Split and add a space before each capital letter * making camelcase words look like this: * "camelCase" => "Camel Case" so it is easier to read * @param str string to prettify */ static prettify: (str: string) => string; /** * Remove special characters from string * make first letter uppercase * @param str string to be cleaned */ static clean: (str: string) => string; static makeFirstLetterLowercase: (str: string) => string; /** * Ensure that the string is in camelcase format and has no spaces * @param str string to ensure valid id format * @returns string in camelcase format and no spaces */ static ensureValidIdFormat: (str: string) => string | undefined; /** * Remove characters from string and make it look legible * less "code" like */ static decodify: (str: string) => string; }