Code Monkey home page Code Monkey logo

choseong-search's Introduction

NPM version Build Status Dependency Status

정규식을 통한 한글 초성 검색 모듈

Install

$ npm install --save choseong-search

Usage

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

choseong-search's People

Contributors

kimshinelove avatar

Watchers

James Cloos avatar Andy (Yoon Yong) Shin avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.