Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

baidu-translate-service

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baidu-translate-service - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

2

package.json
{
"name": "baidu-translate-service",
"version": "2.2.1",
"version": "2.2.2",
"description": "BaiDu Universal translation API access document",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -10,9 +10,9 @@ # baidu-translate-service

q |string| 是| 请求翻译query |UTF-8编码
from |string| 是| 翻译源语言| 可设置为auto
to |string| 是| 翻译目标语言| 不可设置为auto
appid |string| 是| APPID| 可在管理控制台查看
key| string| 是| 秘钥| 在控制台申请查看
tts| integer |否| 是否显示语音合成资源| 0-显示,1-不显示
dict| integer| 否| 是否显示词典资源| 0-显示,1-不显示
action| integer| 否 |判断是否需要使用自定义术语干预API| 1-是,0-否
from |string| 否| 翻译源语言| 默认值为auto
tts| integer |否| 是否显示语音合成资源| 0-显示,1-不显示,默认值为 1
dict| integer| 否| 是否显示词典资源| 0-显示,1-不显示 ,默认值为 1
action| integer| 否 |判断是否需要使用自定义术语干预API| 1-是,0-否,默认值为 0

@@ -29,3 +29,15 @@ ## Response

```html
<script src="./lib/baiduTranslateService.js"></script>
<script src="https://unpkg.com/baidu-translate-service/lib/baiduTranslateService.js"></script>
<script>
baiduTranslateService({
appid: "",
key: "",
to: "en",
q: "今天星期几?",
}).then((result) => {
console.log(result);
});
</script>
```

@@ -46,3 +58,2 @@

to: "en",
from: "auto",
q: "今天星期几?",

@@ -49,0 +60,0 @@ }).then((result) => {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc