UNPKG

normalize-text

Version:

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

16 lines 604 B
/** * Normalize received name by normalizing it's white-spaces and capitalizing * first letter of every word but exceptions (received in lower-case). * @example * normalizeName(' fernanDA MONTENEGRO'); * //=> "Fernanda Montenegro" * * normalizeName(' wilson da costa', ['da']); * //=> "Wilson da Costa" * @param {string} name - A `string` value. * @param {string[]} [exceptions] - A list of exceptions in lower-case. * @returns {string} */ declare const normalizeName: (name: string, exceptions?: string[]) => string; export default normalizeName; //# sourceMappingURL=normalizeName.d.ts.map