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

txt_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

txt_translate - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

README.md

8

index.js

@@ -6,3 +6,6 @@ var request = require("request");

url: 'https://x-api.herokuapp.com/translate',
qs: { api: 'watson' },
qs: {
api: 'watson',
api_key: 'api key'
},
headers:

@@ -17,3 +20,3 @@ {

module.exports.translate = function (from, text, to, api = 'watson', callback) {
module.exports.translate = function (from, text, to, api_key, api = 'watson', callback) {
options.body.from = from;

@@ -23,2 +26,3 @@ options.body.to = to;

options.qs.api = api;
options.qs.api_key = api_key;

@@ -25,0 +29,0 @@ request(options, function (error, response, body) {

{
"name": "txt_translate",
"version": "1.0.1",
"version": "1.0.2",
"description": "translate text",

@@ -5,0 +5,0 @@ "main": "index.js",

var tt = require('./index.js');
tt.translate("en", "thankyou", "ja", api="azure", (data)=>{
tt.translate("en", "thankyou", "ja","qwertyasdf", api="azure", (data)=>{
console.log(data);
});
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