JSPM

romaji-fuzzy-search

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 750
  • Score
    100M100P100Q129244F
  • License SEE LICENSE IN https://github.com/kjirou/romaji-fuzzy-search/blob/main/LICENSE

Generates a regular expression for "Romaji Fuzzy Search"

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

Run tests

This module generates a regular expression for "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.