Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kimshinelove/choseong-search
https://github.com/kimshinelove/choseong-search
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/kimshinelove/choseong-search
- Owner: kimshinelove
- Created: 2015-04-20T13:37:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-14T14:33:56.000Z (over 9 years ago)
- Last Synced: 2024-10-11T12:48:49.454Z (about 1 month ago)
- Language: JavaScript
- Size: 180 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
> 정규식을 통한 한글 초성 검색 모듈## Install
```sh
$ npm install --save choseong-search
```## Usage
```js
require('choseong-search')(String);var text = '동해물과 백두산이 마르고 닳도록';
var case1 = text.SearchKor('ㄷㅎㅁㄱ'); // 동해물과
var case2 = text.SearchKor('ㄱ ㅂ'); // 과 백
var case3 = text.SearchKor('ㅂㄷㅅㅇ'); // 백두산이var case1 = text.SearchKor('해물'); // 해물
var case2 = text.SearchKor('두산'); // 두산
var case3 = text.SearchKor('고'); // 고
var case4 = text.SearchKor('달'); // 닳var case1 = text.SearchKor('해물ㄱ'); // 해물과
var case2 = text.SearchKor('ㅂ두ㅅㅇ'); // 백두산이
var case3 = text.SearchKor('ㅁㄹ고'); // 마르고
var case4 = text.SearchKor('달ㄷㄹ'); // 닳도록-----
var text = '대한민국korea';var case1 = text.SearchKor('ㅁㄱkorea'); // 민국korea
var case2 = text.SearchKor('민국ko'); // 민구ko
var case3 = text.SearchKor('korea'); // korea
var case4 = text.SearchKor('or'); // or-----
var text = '동해물과 백두산이 마르고 닳도록';var case1 = text.SearchKor('ㄷㅎㅁㄱ', true); // 동해물과
var case2 = text.SearchKor('ㄱ ㅂ', true); // null
var case3 = text.SearchKor('ㅂㄷㅅㅇ', true); // null
```## License
MIT © [JiTae, Kim]()
[npm-image]: https://badge.fury.io/js/choseong-search.svg
[npm-url]: https://npmjs.org/package/choseong-search
[travis-image]: https://travis-ci.org/kimshinelove/choseong-search.svg?branch=master
[travis-url]: https://travis-ci.org/kimshinelove/choseong-search
[daviddm-image]: https://david-dm.org/kimshinelove/choseong-search.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/kimshinelove/choseong-search