@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"
  }
]
*/

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @nahanil/shuo

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    32.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • nahanil