npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

pinyin-bot-core

1.39.0 • Public • Published

Pinyin Bot Core

npm version Travis Build Status Greenkeeper badge dependency status dev dependency status MIT-licensed chat on gitter

Install

npm install pinyin-bot-core

Usage

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

Related

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.

install

npm i pinyin-bot-core

Downloadsweekly downloads

1

version

1.39.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability