npm install hanzi-to-pinyin
const convert = require('hanzi-to-pinyin')
convert('我的猫喜欢吃苹果')
.then(console.log)
// [ ['wǒ'], ['de','dī','dí','dì'], ['māo'], ['xǐ huan'], ['chī'], ['píng guǒ'] ]
pinyin-utils
pinyin-split
find-hanzi
hsk-words
cedict
mdbg
pinyin-or-hanzi
pinyin-convert
pinyin-rest
pinyin-api
pinyin-bot-core
pinyin-telegram
pinyin-messenger
pinyin-line
pinyin-chrome
pinyin-cli
hanzi-cli
If you have a question, found a bug or want to propose a feature, have a look at the issues page.