Socket
Socket
Sign inDemoInstall

@feizheng/next-baidu-fanyi

Package Overview
Dependencies
15
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feizheng/next-baidu-fanyi

Baidu fangyi api wrapper.


Version published
Maintainers
1
0

Weekly downloads

Readme

Source

next-baidu-fanyi

Baidu fangyi api wrapper.

installation

npm install -S @feizheng/next-baidu-fanyi

apis

apiparamsdescription
translate-Get translation

options

namedefaultdescription
delay1000Call fn duration.
fromzhfrom which language
toento which language
appid--
secret--
q-keywords

usage

import NxBaiduFanyi from '@feizheng/next-baidu-fanyi';

// code goes here:
NxBaiduFanyi.translate({ q: '苹果', from:'zh', to:'en' }).then((res) => {
  /*
  // res:
  {
    from: 'zh',
    to: 'en',
    trans_result: [{ src: '苹果', dst: 'Apple' }]
  }
  */
});

resources

  • https://api.fanyi.baidu.com/doc/21

FAQs

Last updated on 16 Feb 2020

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