translatte
Advanced tools
Comparing version 2.2.2 to 2.2.3
13
index.js
@@ -109,3 +109,4 @@ const querystring = require('querystring'); | ||
}, | ||
json: true | ||
json: true, | ||
timeout: 10000 | ||
}); | ||
@@ -143,3 +144,4 @@ for (const translation of body.translations) { | ||
}, | ||
json: true | ||
json: true, | ||
timeout: 10000 | ||
}); | ||
@@ -168,3 +170,3 @@ for (const translation of body) { | ||
try { | ||
const {body} = await got(url, {json: true}); | ||
const {body} = await got(url, {json: true, timeout: 10000}); | ||
for (const translation of body.text) { | ||
@@ -196,3 +198,4 @@ result.text += result.text | ||
}, | ||
json: true | ||
json: true, | ||
timeout: 10000 | ||
}); | ||
@@ -272,3 +275,3 @@ for (const translation of body.translations) { | ||
try { | ||
translate = await got(url, {...opts.proxy, json: true, headers: opts.headers}); | ||
translate = await got(url, {...opts.proxy, json: true, timeout: 10000, headers: opts.headers}); | ||
} catch (e) { | ||
@@ -275,0 +278,0 @@ return Promise.reject(errors[4]); |
{ | ||
"name": "translatte", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "A free and unlimited translate for NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
640115
532