@nahanil/shuo
v0.0.2
Published
Turn things like ni3 into nǐ or ㄋㄧˇ or ni³
Downloads
1
Readme
@nahanil/shuo
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"
}
]
*/