//#region src/string/normalize.d.ts /** * Options for normalizing a string */ type NormalizeOptions = { /** * Remove diacritical marks from the string? _(defaults to `true`)_ */ deburr?: boolean; /** * Convert the string to lower case? _(defaults to `true`)_ */ lowerCase?: boolean; /** * Remove special characters from the string? _(defaults to `false`)_ * * _(Punctuation and symbol characters are considered special)_ */ special?: boolean; /** * Trim the string? _(defaults to `true`)_ */ trim?: boolean; /** * Shorten consecutive whitespace characters to a single space? _(defaults to `true`)_ */ whitespace?: boolean; }; /** * String normalizer function */ type Normalizer = { /** * Normalize a string * * @param value String to normalize * @returns Normalized string */ (value: string): string; }; /** * Deburr a string, removing diacritical marks * * @param value String to deburr * @returns Deburred string */ declare function deburr(value: string): string; /** * Initialize a string normalizer * * _Available as `initializeNormalizer` and `normalize.initialize`_ * * @param options Normalization options * @returns Normalizer function */ declare function initializeNormalizer(options?: NormalizeOptions): Normalizer; /** * Normalize a string * * _By default, the string will be trimmed, deburred, and then lowercased_ * * @param value String to normalize * @param options Normalization options * @returns Normalized string */ declare function normalize(value: string, options?: NormalizeOptions): string; declare namespace normalize { var initialize: typeof initializeNormalizer; } //#endregion export { NormalizeOptions, Normalizer, deburr, initializeNormalizer, normalize };