Miss any of our Open RFC calls?Watch the recordings here! »

@nahanil/shuo

0.0.2 • Public • Published

@nahanil/shuo

pipeline status coverage report NPM version    

Turn things like "ni3 hao3" into "nǐ hǎo" or "ㄋㄧˇ ㄏㄠˇ" or "ni³ hao³"

npm install --save @nahanil/shuo
# or 
yarn add @nahanil/shuo
const shuo = require('@nahanil/shuo')
 
shuo.convert('ni3 hao3')
// nǐ hǎo
 
shuo.convert('ni3 hao3', false, 'zhuyin')
// ㄋㄧˇ ㄏㄠˇ
 
shuo.convert('ni3 hao3', false, 'wg')
// ni³ hao³
const shuo = require('@nahanil/shuo')
 
shuo.convert('ni3 hao3', true, 'pinyin')
/*
[
  {
    "tone": "3",
    "syllable": "nǐ",
    "originalSyllable": "ni3"
  },
  {
    "tone": "3",
    "syllable": "hǎo",
    "originalSyllable": "hao3"
  }
]
*/

Install

npm i @nahanil/shuo

DownloadsWeekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

32.5 kB

Total Files

6

Last publish

Collaborators

  • avatar