npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kr-postposition

v2.0.6

Published

Attach suitable postposition with korean word

Downloads

38

Readme

kr-postposition

Combine suitable postposition on korean word

merge(word, type)

Merge and return word with proper postposition according to type.
(attach() was deprecated. It will be removed on next major update, v3.0.0)

word: The word you want to attach postposition

type: Below one of postposition strings for reference

'을' || '를'
'이' || '가'
'은' || '는'
'과' || '와'
'아' || '야'
'이어' || '여'
'이었' || '였'
'으로' || '로'
'은커녕' || '는커녕'

or Custom string for example '(이) + *'

// for example
'이야'  // Exception: If you want to distinguish '이야/야', you must use only '이야' because of duplication with '아/야'
'이랑' || '랑'
'이나' || '나'
'이라도' || '라도'
'이나마' || '나마'
...

example:CommonJS (node.js)

require('kr-postposition').merge('고래', '이랑') // '고래랑'
require('kr-postposition').merge('사랑', '나') // '사랑이나'

example:Browser

// use kr-postposition.js or kr-postposition.min.js in the library directory and 'script' tag
krPostposition.merge('예약', '와') // '예약과'
krPostposition.merge('고양이', '이었다') // '고양이였다'

parse(sentence)

Parse postposition with open-closed symbols to merged words in the whole sentence.
(Default open symbol is '{', and close symbol is '}')

sentence: The sentence you want to parse that has postposition with open-closed symbols

example:CommonJS (node.js)

require('kr-postposition').parse('나{은} 너{을} 사랑해') // 나는 너를 사랑해

example:Browser

krPostposition.parse('돌고래{은} 이마의 구멍{로} 숨{를} 쉬는 것{여}서, 종종 물 밖{로} 나와야 한다.') // 돌고래는 이마의 구멍으로 숨을 쉬는 것이어서, 종종 물 밖으로 나와야 한다.

getSymbol()

Get open and close symbol

setSymbol(openSymbol, closeSymbol)

setOpenSymbol(openSymbol)

setCloseSymbol(closeSymbol)

Set new open, or closed, or open and closed symbol.
If parameter is empty, Symbol is set to default symbols '{' and '}'