UNPKG

normalize-text

Version:

Provides a simple API to normalize texts, white-spaces, paragraphs & diacritics.

19 lines 703 B
/** * Normalize all white-space characters and remove trailing ones received text. * @example * normalizeWhiteSpaces(' What exactly is it? '); * //=> "What exactly is it?" * * normalizeWhiteSpaces('Hi, how is \r\n everything \t?'); * //=> 'Hi, how is everything ?' * * normalizeWhiteSpaces`It is ${temperature}\n degree\r outside. ` * //=> 'It is 25 degree outside.' * ``` * @returns {string} * @param parts - A `string` or `tagged template` value * @param {unknown[]} values */ export declare const normalizeWhiteSpaces: (parts: TemplateStringsArray | string, ...values: unknown[]) => string; export default normalizeWhiteSpaces; //# sourceMappingURL=normalizeWhiteSpaces.d.ts.map