UNPKG

@pexxi/fold-to-ascii-ts

Version:

A JavaScript port of the Apache Lucene ASCII Folding Filter that converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into a ASCII equivalents, if they exist.

7 lines (6 loc) 272 B
export default class ASCIIFolder { static foldReplacing(str?: string, replacement?: string): string; static foldMaintaining(str?: string): string; static _fold(str: string, fallback: (str: string) => string): string; static mapping: Map<number, string>; }