1.1.0 • Published 3 years ago

romaji-fuzzy-search v1.1.0

Weekly downloads
-
License
SEE LICENSE IN ht...
Repository
github
Last release
3 years ago

romaji-fuzzy-search

Run tests

This module generates a regular expression for "Romaji Fuzzy Search".

:thinking: "Romaji Fuzzy Search"?

It's a original concept.

Allows you to search Japanese Hiragana and Katakana from a query consisting of alphabets.

:rocket: Installation

npm install romaji-fuzzy-search

:cat: 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.
1.1.0

3 years ago

1.0.0

3 years ago