npm install pinyin-bot-core
const botCore = require('pinyin-bot-core')
// Default
botCore.processMessage('你的中文很好啊')
.then(console.log) // nǐ de zhōng wén hěn hǎo a
// Pinyin (/p | /pinyin)
botCore.processMessage('/p 你的中文很好啊')
.then(console.log) // nǐ de zhōng wén hěn hǎo a
botCore.processMessage('/p nǐ de zhōng wén hěn hǎo a')
.then(console.log) // ni3 de zhong1 wen2 hen3 hao3 a
botCore.processMessage('/p ni3 de zhong1 wen2 hen3 hao3 a')
.then(console.log) // nǐ de zhōng wén hěn hǎo a
// Split (/s | /split)
botCore.processMessage('/s nidezhongwenhenhaoa')
.then(console.log) // ni de zhong wen hen hao a
botCore.processMessage('/s nǐdezhōngwénhěnhǎoa')
.then(console.log) // nǐ de zhōng wén hěn hǎo a
botCore.processMessage('/s ni3dezhong1wen2hen3hao3a')
.then(console.log) // ni3 de zhong1 wen2 hen3 hao3 a
pinyin-utils
pinyin-split
zhuyin
find-hanzi
hsk-words
cedict
mdbg
pinyin-or-hanzi
hanzi-to-pinyin
pinyin-convert
pinyin-rest
pinyin-api
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.