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

yet-another-yandex-translate

v1.2.3

Published

Yet another Yandex.Translate service client

Readme

yet-another-yandex-translate Build Status Greenkeeper badge

Translate any type of data (string, string[], json) into one or more languages.

Installation

  1. Sign up for a Yandex API key at https://translate.yandex.com/developers/keys

  2. Install this package in your project:

    $ npm install --save yet-another-yandex-translate

Adding to your project

In Node.js

Call require to get the instance:

const { YandexTranslate } = require('yet-another-yandex-translate');

Or in ES6 and TS:

import YandexTranslate from 'yet-another-yandex-translate';

Usage

const yt = new YandexTranslate('<< YOUR YANDEX API KEY HERE >>');

Translate

Translate any type of data (string, string[], json) into one or more languages:

// Hello world!
await yt.translate('Привет мир!', {from: 'ru', to: 'en', format: 'html'});

// [ 'foo', 'bar' ]
await yt.translate([ 'foo', 'bar' ], {to: 'en', format: 'plain'});

// [{text: 'Hello world!', lang: 'en'}, {text: 'Bonjour tout le monde!', lang: 'fr'}]
await yt.translate('Привет мир!', {to: ['en', 'fr']});

// [{text: ['Hello world!', 'Hello world!'], lang: 'en'}, {text: ['Bonjour tout le monde!', 'Bonjour tout le monde!'], lang: 'fr'}]
await yt.translate(['Привет мир!', 'Привет мир!'], {to: ['en', 'fr']});   

// {
//   key1: 'Hello 1',
//   key2: 'hi 2',
//   key3: [ false, 'Hello 1', true, 'hi 2', null ],
//   key4: 123,
//   привет: [ 'hi 4' ]
// }
const test = {
    key1: 'привет 1',
    key2: 'привет 2',
    key3: [false, 'привет 1', true, 'привет 2', null],
    key4: 123,
    привет: ['привет 4']
};
await yt.translate(text, {to: 'en'});

Detect the language

Detects the language of the specified any type of data (string, string[], json).

// ru
await yt.detect('Привет мир!');

// ru
await yt.detect('Привет мир!', {hint: 'en,fr'});

// ru
await yt.detect(test, {hint: 'en,fr'});

// [{lang: 'ru'}, {lang: 'en'}]
await yt.detect(['Привет мир!', 'Hello world!']);

Get the list of supported languages

// {dirs: [], langs: {}}
await yt.getLangs();
await yt.getLangs({ui: 'en'});

Yandex Translate

Demo | Docs | List of supported languages | API Key | Statistics