@kmdtmyk/nconv
v0.3.6
Published
Japanese conversion library.
Downloads
4
Maintainers
Readme
Nconv
Japanese conversion library. This converts hiragana, katakana, romaji. Also, this converts half-width and full-width character.
Demo
https://kmdtmyk.github.io/nconv.js/
Install
npm install @kmdtmyk/nconv
Usage
import Nconv from '@kmdtmyk/nconv'
Nconv.romajiToHiragana('aiueo')
// => あいうえお
Nconv.romajiToZenKata('aiueo')
// => アイウエオ
Nconv.romajiToHanKata('aiueo')
// => アイウエオ
Nconv.hiraganaToZenKata('あいうえお')
// => アイウエオ
Nconv.hiraganaToHanKata('あいうえお')
// => アイウエオ
Nconv.zenKataToHiragana('アイウエオ')
// => あいうえお
Nconv.zenKataToHanKata('アイウエオ')
// => アイウエオ
Nconv.hanKataToHiragana('アイウエオ')
// => あいうえお
Nconv.hanKataToZenKata('アイウエオ')
// => アイウエオ
Nconv.alphabetToZenkaku('abcde')
// => abcdef
Nconv.alphabetToHankaku('abcdef')
// => abcde
Nconv.numericToZenkaku('0123456789')
// => 0123456789
Nconv.numericToHankaku('0123456789')
// => 0123456789
Nconv.symbolToZenkaku('!?(){}')
// => !?(){}
Nconv.symbolToHankaku('!?(){}')
// => !?(){}
Nconv.toZenkaku('123abcアイウ!?')
// => 123abcアイウ!?
Nconv.toHankaku('123abcアイウ!?')
// => 123abcアイウ!?
License
MIT