Socket
Book a DemoInstallSign in
Socket

free-translator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

free-translator

Free translator NPM package based on headless Web browser

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

Translator

Free translator NPM package based on headless Web browser, inspired by fcc_trad

NPM Dependency

NPM

Support

Translate platform

Dependency

Google® Chrome™ 60+

Example

'use strict';

const Translator = require('free-translator');

console.log = function () {/* fix Babel bug in Chromy */};


(async function () {

    const start = Date.now(),
          translator = await (new Translator()).boot();

    console.info(`[Boot - ${(Date.now() - start) / 1000}s]\n`);

    console.dir(await translator.batch(
        ['Hello, Google!',  'Bye, GFW!'],  function (text, seconds) {

            console.info(`[Submit - ${seconds}s]  ${text}\n`);
        }
    ));

    await translator.destroy();
})();

Keywords

translate

FAQs

Package last updated on 06 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts