export declare const capitalize: (value: string) => string; export declare const toSentenceCase: (value: string | undefined) => string; export declare const TITLE_CASE_EXCEPTION_WORDS: string[]; export declare const toTitleCase: (value: string | undefined) => string; export declare const prettyCONSTName: (value: string | undefined) => string; export declare const isCamelCase: (value: string | undefined) => boolean; export declare const prettyCamelCase: (value: string | undefined) => string; export declare const tryToFormatJSONString: (value: string, tabSize?: number) => string; export declare const tryToMinifyJSONString: (value: string) => string; /** * One very common use case is that we get the JSON as response from the server than we will convert this to a string and persist * in the protocol. As such, we have to make sure this string is safe in PURE grammar format, i.e. it will escape single quotes * properly since PURE strings are wrapped in a pair of single quotes. The following pair of escape/unescape method does the simple job of * converting a JSON string to/from PURE grammar string * * NOTE: this is slightly different than escaping/unescaping JS string or normal JSON string, this is conversion is actually simplier since * the escaping is naturally handling by string conversion in Javascript, we just need to have special handling for the escaping of single-quotes * See https://stackoverflow.com/questions/3020094/how-should-i-escape-strings-in-json * See https://github.com/joliss/js-string-escape/blob/master/index.js */ export declare const fromGrammarString: (value: string) => string; export declare const toGrammarString: (value: string) => string; /** * These are the sets of methods that helps with lossless conversion of JSON to/from text. * * The implementation of `JSON.parse` and `JSON.stringify` in Javascript is not lossless, e.g. values like 1.0 (a double) is automatically converted to 1 (an integer). * This pairs of method will convert the JSON losslessly. One caveat is that numeric values are stored as LosslessNumber, a data type which stores the numeric value as a string. * * NOTE: One can perform regular operations with a LosslessNumber, and it will throw an error when this would result in losing information. * But use this with discretion since it it does not result in the same object as `JSON.parse` */ export { stringify as losslessStringify, parse as losslessParse, } from 'lossless-json'; export declare const tryToFormatLosslessJSONString: (value: string, tabSize?: number) => string; export declare const tryToMinifyLosslessJSONString: (value: string) => string; //# sourceMappingURL=FormatterUtils.d.ts.map