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

bing-translate-api

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bing-translate-api - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

4

index.d.ts

@@ -32,3 +32,3 @@ // AUTO-GENERATED. SEE scripts/index.tpl.d.ts FOR ORIGINAL TYPINGS

*/
from: string;
from?: string;
/**

@@ -41,3 +41,3 @@ * The language code of translated text

*/
score: number;
score?: number;
};

@@ -44,0 +44,0 @@ /**

{
"name": "bing-translate-api",
"version": "4.0.1",
"version": "4.0.2",
"description": "A simple and free API for Bing & Microsoft Translator for Node.js",

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

@@ -317,3 +317,3 @@ /**

const translation = body[0].translations[0]
const detectedLang = body[0].detectedLanguage
const detectedLang = body[0].detectedLanguage || {}

@@ -320,0 +320,0 @@ /**

const { translate } = require('../src/index')
const { maxTextLen, maxCorrectableTextLen, maxEPTTextLen, maxTextLenCN } = require('../src/config.json')
/**
* @param {import('..').TranslationResult} res
*/
function printRes(res) {

@@ -9,2 +12,5 @@ console.log(res.text, '---->', res.translation, 'fromLang', res.language.from)

/**
* @param {import('..').TranslationResult} res
*/
function printCorrectRes(res) {

@@ -15,2 +21,6 @@ console.log(res.text, '---->', res.correctedText)

/**
* @param {Error} e
* @param {boolean} [notExit]
*/
function onErr(e, notExit) {

@@ -17,0 +27,0 @@ console.error(e)

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