/** * Call `toString()` on a value if it exists in its prototype, or return `''` otherwise. * * This assumes that anything implementing `.toString()` returns a string type. */ export declare const toStringOrEmptyString: (value: any) => string; /** * Convert a string to title case. */ export declare const toTitleCase: (str: string) => string; /** * Convert a string from pascal to camel case. */ export declare const pascalToCamelCase: (str: string) => string; /** * Get the initials for each word in a string (capitalized). */ export declare const getInitials: (str: string) => string; /** * Convert a number to it's ordinal version. */ export declare const toOrdinal: (n: number) => string; /** * Filter falsy elements from an array, then join them. Default separator: `', '`. */ export declare const filterAndJoin: (parts: (string | false | null | undefined)[], separator?: string) => string; /** * Remove the prefix of a base64 encoded data url (e. g. `data:image/jpeg;base64,`, `data:image/png;base64,`, `data:application/pdf;base64,`). */ export declare const removeDataUrlPrefix: (data: string) => string; /** * Convert a size description into its amount of bytes (inspired by the `ms` package). * * `KiB`, `MiB`, `GiB` are IEC standard, `kB`, `MB`, `GB` are SI standard. * @see https://en.wikipedia.org/wiki/Kilobyte */ export declare const bytes: (input: string) => number; /** * Format a number of bytes into a human-readable format. * * @see https://github.com/sindresorhus/pretty-bytes */ export declare const formatBytes: (n: number) => string;