translatte
Advanced tools
Comparing version 2.1.1 to 2.1.2
11
index.js
@@ -9,2 +9,3 @@ const querystring = require('querystring'); | ||
opts = opts || {}; | ||
opts = JSON.parse(JSON.stringify(opts)); | ||
@@ -48,5 +49,9 @@ let result = { | ||
opts.priority = opts.services | ||
? Object.keys(opts.services) // google_free, google_v3, microsoft_v3, yandex_v1, yandex_v2 | ||
: ['google_free']; | ||
opts.priority = opts.priority | ||
? typeof opts.priority === 'string' | ||
? [opts.priority] | ||
: opts.priority | ||
: opts.services | ||
? Object.keys(opts.services) | ||
: ['google_free']; | ||
@@ -53,0 +58,0 @@ if (opts.priority.length > 1) { |
{ | ||
"name": "translatte", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "A free and unlimited translate for NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
639756
525