Socket
Socket
Sign inDemoInstall

baidu-fanyi

Package Overview
Dependencies
8
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

baidu-fanyi

baidu fanyi api on node.js


Version published
Maintainers
1
0

Weekly downloads

Readme

Source

baidu-fanyi

baidu fanyi api on node.js

Usage

You can gain appid and key from baidu fanyi website.

import Translater from 'baidu-fanyi'

const trans = new Translater('Your Appid', 'Your Key')
trans.translate('hello world', { to: 'zh' })
  .then(data => {
    console.log(data) // output: '你好,世界'
  })

or CommandJS

const Translater = require('baidu-fanyi')

const trans = new Translater('Your Appid', 'Your Key')
trans.translate('こんにちは、世界', { to: 'zh' })
  .then(data => {
    console.log(data) // output: '你好,世界'
  })

FAQs

Last updated on 28 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc