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).
npm install @lde/text-normalizationimport { fold } from '@lde/text-normalization';
fold('M酶hlmann'); // 'mohlmann'
fold('Co枚peratieve'); // 'cooperatieve'
fold('Stra脽e'); // 'strasse'See the full documentation.