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

ding-trans

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ding-trans - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

13

bin/deepl-translate.js

@@ -34,14 +34,17 @@ #! /usr/bin/env node

//查词
sendInfo(queryStr);
// console.log(queryStr);
sendInfo(querystring.unescape(queryStr));
}
//发送请求
function sendInfo(query) {
function sendInfo(queryStr) {
axios
.post("http://47.95.239.198:9521/translate", {
data: { text: query, source_lang: "auto", target_lang: "ZH" },
data: { text: queryStr, source_lang: "auto", target_lang: "ZH" },
})
.then((res) => {
console.log(`${"翻译: ".green.bold}${res.data}`);
console.log(`=============================================== \n`.rainbow);
console.log(
`${"🚀🚀🚀 翻译: ".green.bold}${querystring.unescape(res.data)}`
);
console.log(`\n===============================================`.rainbow);
});
}
{
"name": "ding-trans",
"version": "1.1.0",
"version": "1.1.1",
"description": "a translation cli",

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

@@ -11,2 +11,14 @@ # ding-trans (ding 翻译)

#### new! 新增 deepl 翻译(英译中,吊打其他翻译,基于深度学习)
```sh
dd <content>
# eg.
dd hello world
```
![](https://assets.fedtop.com/picbed/20220706142743.png)
![](https://assets.fedtop.com/picbed/20220706143047.png)
##### 查单词:

@@ -13,0 +25,0 @@

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