npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

blt-translate-api

v0.5.0

Published

Free and unlimited translate API. This api use Microsoft and Yandex translate service.

Readme

blt-translate-api

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.

Requierments

  • Mozilla Firefox
  • java
  • node js

Description

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.

Examples

Example initialize data where come from request

var data = {from:"en",to:"tr",text:"hello"}
// or you can use without 'from'
data = {to:"tr",text:"hello"}
  • You can declare options is optional value. When you leave it blank default value is 1 Other values mean is;

"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

var options = 4

Default Usage:


    bltTranslate.translate(data).then(function (result) {
        res.json(result);
        console.log('Request took: ' + moment().diff(startDate) + ' ms.');
    }).catch(err => res.json({message:err}));

Use With options:


var options = 1 // Default (Microsoft to Yandex)
 options  = 2 //Yandex to Microsoft)
 options  = 3 // just Microsoft
 options  = 4 // just Yandex

    bltTranslate.translate(data,options).then(function (result) {
        res.json(result);
        console.log('Request took: ' + moment().diff(startDate) + ' ms.');
    }).catch(err => res.json({message:err}));

If you want to your Yandex API KEY then you must declate value as example.

Use With Yandex API:


 var apiData={useAPI:true,apiKey:"<YOUR_YANDEX_API_KEY>"}
    bltTranslate.translate(data,options,apiData).then(function (result) {
        res.json(result);
        console.log('Request took: ' + moment().diff(startDate) + ' ms.');
    }).catch(err => res.json({message:err}));

All Case Usage


var BltTranslate = require("blt-translate-api");
var express = require('express');
var bodyParser = require('body-parser');
var url = require('url');
var moment = require('moment');
var app = express();


var bltTranslate = new BltTranslate()

//Example proxy config 
// this config data use to create new Free Yandex Translate ID 
const defaultConfig = {
    browserMob:{ host:'localhost',  port: 7778, protocol:'http' },
    };

bltTranslate.setConfig(defaultConfig)

app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());

app.listen(1923, function () {
    console.log("Port listening 1923...");
});

app.get('/api/translate', function (req, res) {

    // this value just get response time 
    var startDate = moment();

    var q = url.parse(req.url, true).query;
    var apiData = { useAPI: false, apiKey: "<YOUR_YANDEX_API_KEY>" }

    bltTranslate.translate(q, 4, apiData).then(function (result) {
        res.json(result);
        console.log('Request took: ' + moment().diff(startDate) + ' ms.');
    }).catch(err => res.json({ message: err }));
});