papago-translate
Advanced tools
Comparing version 0.0.1 to 0.1.0
10
main.js
@@ -24,3 +24,3 @@ /** | ||
if (!code || typeof code != "string") return { error: true, message: "func(validateLanguageCode): Please provide a string code to `validateLanguageCode` function." }; | ||
if (!LANGUAGE_CODES[code.toLowerCase()]) return { error: false, result: false }; | ||
if (!LANGUAGE_CODES[code]) return { error: false, result: false }; | ||
return { error: false, result: true }; | ||
@@ -53,5 +53,2 @@ } | ||
if (typeof from != "string" || typeof to != "string" || typeof locale != "string") return { error: true, message: "func(translate): Please make sure \"from\", \"to\" and \"locale\" are valid and their data type is string." }; | ||
from = from.toLowerCase(); | ||
to = to.toLowerCase(); | ||
locale = locale.toLowerCase(); | ||
if ((from != "auto" && !LANGUAGE_CODES[from]) || !LANGUAGE_CODES[to]) return { error: true, message: `func(translate): Papago doesn't support this language yet (received from(${from}) to(${to})).` }; | ||
@@ -112,5 +109,2 @@ if (!LANGUAGE_CODES[locale]) return { error: true, message: `func(translate): Papago doesn't support this locale yet (received ${locale}).` }; | ||
if (typeof from != "string" || typeof to != "string" || typeof locale != "string") return { error: true, message: "func(define): Please make sure \"from\", \"to\" and \"locale\" are valid and their data type is string." }; | ||
from = from.toLowerCase(); | ||
to = to.toLowerCase(); | ||
locale = locale.toLowerCase(); | ||
if ((from != "auto" && !LANGUAGE_CODES[from]) || !LANGUAGE_CODES[to]) return { error: true, message: `func(define): Papago doesn't support this language yet (received from(${from}) to(${to})).` }; | ||
@@ -155,4 +149,4 @@ if (!LANGUAGE_CODES[locale]) return { error: true, message: `func(define): Papago doesn't support this locale yet (received ${locale}).` }; | ||
module.exports = { | ||
version: "0.0.1", | ||
version: "0.1.0", | ||
Papago: Papago | ||
}; |
{ | ||
"name": "papago-translate", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "A Node.js NPM package for using Naver Papago easily (papago.naver.com).", | ||
@@ -28,2 +28,2 @@ "main": "main.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
15196
182