Gathering detailed insights and metrics for blt-translate-api
Gathering detailed insights and metrics for blt-translate-api
npm install blt-translate-api
Typescript
Module System
Node Version
NPM Version
47.7
Supply Chain
84.4
Quality
68.4
Maintenance
30
Vulnerability
96.4
License
JavaScript (86.99%)
Batchfile (10.08%)
Shell (2.94%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,302
Last Day
1
Last Week
2
Last Month
8
Last Year
148
9 Commits
1 Watchers
5 Branches
1 Contributors
Updated on Apr 26, 2020
Latest Version
0.5.0
Package Id
blt-translate-api@0.5.0
Unpacked Size
22.06 MB
Size
19.21 MB
File Count
40
NPM Version
3.5.2
Node Version
8.10.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
0%
2
Compared to previous week
Last Month
-75.8%
8
Compared to previous month
Last Year
-27.8%
148
Compared to previous year
Use Microsoft Translate And Yandex Translate
You can translate using by multi translate server(Yandex and Microsoft). When Microsoft translate give a error then activated Yandex translate. These operations take place for each request. If you want to use Yandex to Microsoft translate then you can change operation value .(You can see examples). Also you can run just one(Microsoft or Yandex). You can use legal Yandex Translate API.
This project contains Microsoft and Yandex Translator. Automatic generate translate id for both translator. Id generates every one hour on background(It will get to change time synchronize in the next time). This background proccess needs java and **Firefox Browser to run.
Perhaps the id usage may have expired in config.json. So run the project you should wait a few minutes to create new id.
1var data = {from:"en",to:"tr",text:"hello"} 2// or you can use without 'from' 3data = {to:"tr",text:"hello"} 4
"1" Microsoft Translate to Yandex Translate (When Microsoft Translate does not work then run Yandex translate)
"2" Yandex Translate to Microsoft Translate (When Yandex Translate does not work then run Microsoft translate)
"3" just use Microsoft Translate
"4" just use Yandex Translate
1var options = 4 2
1 2 bltTranslate.translate(data).then(function (result) { 3 res.json(result); 4 console.log('Request took: ' + moment().diff(startDate) + ' ms.'); 5 }).catch(err => res.json({message:err})); 6
1 2var options = 1 // Default (Microsoft to Yandex) 3 options = 2 //Yandex to Microsoft) 4 options = 3 // just Microsoft 5 options = 4 // just Yandex 6 7 bltTranslate.translate(data,options).then(function (result) { 8 res.json(result); 9 console.log('Request took: ' + moment().diff(startDate) + ' ms.'); 10 }).catch(err => res.json({message:err})); 11
If you want to your Yandex API KEY then you must declate value as example.
1 2 var apiData={useAPI:true,apiKey:"<YOUR_YANDEX_API_KEY>"} 3 bltTranslate.translate(data,options,apiData).then(function (result) { 4 res.json(result); 5 console.log('Request took: ' + moment().diff(startDate) + ' ms.'); 6 }).catch(err => res.json({message:err})); 7
1 2var BltTranslate = require("blt-translate-api"); 3var express = require('express'); 4var bodyParser = require('body-parser'); 5var url = require('url'); 6var moment = require('moment'); 7var app = express(); 8 9 10var bltTranslate = new BltTranslate() 11 12//Example proxy config 13// this config data use to create new Free Yandex Translate ID 14const defaultConfig = { 15 browserMob:{ host:'localhost', port: 7778, protocol:'http' }, 16 }; 17 18bltTranslate.setConfig(defaultConfig) 19 20app.use(bodyParser.urlencoded({ extended: true })); 21app.use(bodyParser.json()); 22 23app.listen(1923, function () { 24 console.log("Port listening 1923..."); 25}); 26 27app.get('/api/translate', function (req, res) { 28 29 // this value just get response time 30 var startDate = moment(); 31 32 var q = url.parse(req.url, true).query; 33 var apiData = { useAPI: false, apiKey: "<YOUR_YANDEX_API_KEY>" } 34 35 bltTranslate.translate(q, 4, apiData).then(function (result) { 36 res.json(result); 37 console.log('Request took: ' + moment().diff(startDate) + ' ms.'); 38 }).catch(err => res.json({ message: err })); 39}); 40
No vulnerabilities found.
Reason
binaries present in source code
Details
Reason
no SAST tool detected
Details
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
18 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-03-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More