c2e

1.0.1 • Public • Published

c2e

这是一个工具,使用有道API,可以将中文翻译为英文。

Usage

npm install c2e --save
 
var C2e = require('c2e');
var c2e = new C2e('your keyfrom', 'your key');
 
//c2e.translate 方法返回promise
c2e.translate('这是一个工具,可以将中文翻译为英文').then(function(data) {
  //[ 'This','is','a','tool','that','can','translate','Chinese','into','English' ]
})
 
 

有道API申请地址:http://fanyi.youdao.com/openapi

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i c2e

    Weekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • imochen