Package Exports
- hangul-search-js
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 (hangul-search-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
π°π· Hangul Search Js
It allows you to search for simple Korean characters in the most consistent order regardless of the character assembly order.
π¦ Usage (ES5+)
npm i hangul-search-jsimport { 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.