UNPKG

pinyin-zhuyin

Version:

Library for converting from pinyin to zhuyin

17 lines (11 loc) 424 B
# `pinyin-zhuyin` Package for converting pinyin text to zhuyin/bopomofo text 拼音转换为注音(ㄅㄆㄇㄈ) ## Install 安装 `npm install pinyin-zhuyin` ## Usage 使用 ``` import { pinyinToZhuyin } from 'pinyin-zhuyin'; console.log(pinyinToZhuyin('Wǒ bùshì měiguó rén. Tā shì měiguó rén.')); // ㄨㄛˇ ㄅㄨˋㄕˋ ㄇㄟˇㄍㄨㄛˊ ㄖㄣˊ. ㄊㄚ ㄕˋ ㄇㄟˇㄍㄨㄛˊ ㄖㄣˊ. ```