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

papago-translate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

papago-translate - npm Package Compare versions

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
};

4

package.json
{
"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",

}
}
}
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