Socket
Socket
Sign inDemoInstall

hangul-search

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hangul-search - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

16

package.json
{
"name": "hangul-search",
"version": "1.1.3",
"version": "1.2.0",
"description": "Json객체에서 한글 검색을 수행. 한글 초성 검색을 지원. Korean search within JSON objects. Supports Korean initial consonant search.",

@@ -12,5 +12,5 @@ "main": "src/index.js",

"Korean initial consonant",
"한글",
"초성",
"초성검색"
"한글",
"초성",
"초성검색"
],

@@ -30,3 +30,9 @@ "author": "hwantage <hwantagexsw2@gmail.com> (https://hwantage.github.io)",

"node": ">=18.15.0"
}
},
"contributors": [
{
"name": "hwahyeon",
"url": "https://github.com/hwahyeon"
}
]
}

@@ -15,2 +15,3 @@ ## hansearch

* 기본적으로 exact matching 으로 동작합니다.
* 특수문자에 대한 검색을 지원합니다. (Contributions by [hwahyeon](https://github.com/hwahyeonhttps:/))
* Typescript 를 지원하도록 구현하였습니다.

@@ -17,0 +18,0 @@ * AMD, CJS 스펙을 모두 지원할 수 있도록 UMD 패턴으로 작성하였습니다.

@@ -29,3 +29,3 @@ /*!

const makeRegexByCho = function (keyWord = "") {
const escapedSearch = keyWord.replace(/[()|[\]{}\\]/g, ""); // 특수 문자 이스케이프
const escapedSearch = keyWord.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
const regex = CHO_HANGUL.reduce((acc, cho, index) => acc.replace(new RegExp(cho, "g"), `[${combineHangul(index, 0, 0)}-${combineHangul(index + 1, 0, -1)}]`), escapedSearch);

@@ -32,0 +32,0 @@ return new RegExp(`(${regex})`, "ig");

Sorry, the diff of this file is not supported yet

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