UNPKG

tafic

Version:

To ASCII First Impression Converter - normalizes text to closest first impression of reader based on ASCII set.

25 lines (22 loc) 853 B
interface Options { skipHardcodedMapping?: boolean; removeLeftovers?: boolean; onLeftovers?: ((nonASCII: string) => void) | null; } declare class TAFIC { private static readonly Homoglypher; private static readonly EmojiRegex; private static readonly RegExp_ALL_ASCII_IN_STR; private static readonly RegExp_ALL_NONASCII_IN_STR; private static readonly RegExp_ACCENTS; static Normalize(str: string, o?: Options): string; private static GetGraphemes; private static IsGraphemeOnlyASCII; private static IsStringOnlyEmoji; private static SeparateAndRemoveDiacriticsForHCMapping; private static ApplyHardcodedMapRules; private static RemoveZeroWidthCharacters; private static ApplyBuiltinCompatibilities; private static RemoveNonASCII; } export { type Options, TAFIC, TAFIC as default };