Skip to content

Latest commit

History

History

README.md

@lde/text-normalization

Zero-dependency text folding for search index and query normalization.

fold() produces a diacritic- and case-insensitive form of a string, applied identically at index time and query time so that a search index never diverges from the queries run against it (divergence = silent search misses).

Installation

npm install @lde/text-normalization
import { fold } from '@lde/text-normalization';

fold('M酶hlmann'); // 'mohlmann'
fold('Co枚peratieve'); // 'cooperatieve'
fold('Stra脽e'); // 'strasse'

Documentation

See the full documentation.