Package Exports
- romaji-fuzzy-search
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (romaji-fuzzy-search) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
romaji-fuzzy-search
This module generates a regular expression for "Romaji Fuzzy Search".
🤔 "Romaji Fuzzy Search"?
It's a original concept.
Allows you to search Japanese Hiragana and Katakana from a query consisting of alphabets.
🚀 Installation
npm install romaji-fuzzy-search
🐱 Usage
const {convertToRegExp} = require('romaji-fuzzy-search')
const query = 'kyayaak'
const regExp = convertToRegExp('kyayaak') // -> "(?:kya|きゃ|キャ)(?:ya|や|ヤ)(?:a|あ|ア)k"
const matcher = new RegExp(regExp, 'i') // I think it's better to specify the "i" option.