Socket
Book a DemoInstallSign in
Socket

hangul-search-js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hangul-search-js

Simple Korean text search module

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

🇰🇷 Hangul Search Js

It allows you to search for simple Korean characters in the most consistent order regardless of the character assembly order.

Github Workflow GitHub License Jest Coverage Gzip Size TypeScript NPM Version jsDelivr


📦 Usage (ES5+)

npm i hangul-search-js
import { createSearch } from 'hangul-search-js'

const search = createSearch([
  '롯데시네마',
  '유튜브',
  '프로게이머',
  '가난',
  '난가'
])

const result = search('시ㄴ')
// result: ['롯데시네마', '프로게이머', '가난', '난가']

const resultExact = search('시ㄴ', { exact: true })
// result: ['롯데시네마']

const resultExact = search('난가', { exact: true, order: true })
// result: ['난가']

📦 Usage (CDN)

<script src="https://cdn.jsdelivr.net/npm/hangul-search-js/export/hangul-search.js"></script>
var createSearch = window.hangulSearch

var search = createSearch([
  '롯데시네마',
  '유튜브',
  '프로게이머',
  '가난',
  '난가'
])

var result = search('시ㄴ')
// result: ['롯데시네마', '프로게이머', '가난', '난가']

var resultExact = search('시ㄴ', { exact: true })
// result: ['롯데시네마']

var resultExact = search('난가', { exact: true, order: true })
// result: ['난가']

💡 License

MIT Licensed.

Keywords

korea

FAQs

Package last updated on 25 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts