New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More โ†’
Socket
Sign inDemoInstall
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

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc