UNPKG

romaji-fuzzy-search

Version:

Generates a regular expression for "Romaji Fuzzy Search"

20 lines (19 loc) 940 B
export declare type RomajiDictionaryItem = readonly [string, string, string]; export declare type RomajiDictionary = readonly RomajiDictionaryItem[]; export declare type IndexedRomajiDictionary = Readonly<{ [k in string]: RomajiDictionaryItem; }>; /** * ひらがな文字をカタカナ文字へ変換する。 * * 渡せることを想定しているひらがなは、以下の範囲) * - http://www.unicode.org/charts/PDF/U3040.pdf の 3041-3094, 309D, 309E 。 * - 正規表現にすると /[ぁ-ゔゝゞ]/ の範囲。 * * それらを以下のカタカナへ変換する) * - http://www.unicode.org/charts/PDF/U30A0.pdf の 30A0-30F4, 30FD, 30FE 。 * - 正規表現にすると /[ァ-ヴヽヾ]/ の範囲。 */ export declare const convertHiraganaToKatakana: (text: string) => string; export declare const romajiDictionary: RomajiDictionary; export declare const indexedRomajiDictionary: IndexedRomajiDictionary;