New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.0.33 to 1.0.34

16

bin/translate.js

@@ -15,13 +15,10 @@ #! /usr/bin/env node

//=======================================================
let argv = require("yargs").argv,
queryStr = encodeURI(argv._.join(" ")),
read = argv.r || argv.read;
if (!queryStr) {
console.log("word or sentence required...");
} else {
// console.log(argv);
console.log("播放中...".green);
if (argv.say == true || argv.S == true) {
console.log("播放中...".green);
say.speak(querystring.unescape(queryStr));

@@ -32,11 +29,6 @@ return;

}
if (read) {
console.log("waiting for the new function...");
}
function format(json) {
// console.log("\n");
// console.log(JSON.parse(json), "\n");
let data = JSON.parse(json),

@@ -51,7 +43,5 @@ pronTitle = "发音:",

template = "";
let basic = data.basic,
web = data.web,
translation = data.translation;
if (basic ? basic : "") {

@@ -62,3 +52,2 @@ for (let i = 0; i < basic.explains.length; i++) {

}
if (web ? web : "") {

@@ -75,3 +64,2 @@ for (let i = 0; i < web.length; i++) {

}
translation ? (machineTrans = translation) : false;

@@ -90,3 +78,2 @@ template =

machineTrans;
console.log(template);

@@ -115,3 +102,2 @@ }

});
response.on("end", function () {

@@ -118,0 +104,0 @@ // 数据接收完成

3

package.json
{
"name": "ding-trans",
"version": "1.0.33",
"version": "1.0.34",
"description": "a translation cli",

@@ -20,5 +20,4 @@ "main": "index.js",

"colors": "^1.4.0",
"say": "^0.16.0",
"yargs": "^17.0.1"
}
}
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