Socket
Socket
Sign inDemoInstall

@jswork/next-baidu-fanyi

Package Overview
Dependencies
15
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @jswork/next-baidu-fanyi

Baidu fangyi api wrapper.


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

next-baidu-fanyi

Baidu fangyi api wrapper.

version license size download

installation

npm install -S @jswork/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 '@jswork/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

license

Code released under the MIT license.

Keywords

FAQs

Last updated on 17 May 2023

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