Socket
Socket
Sign inDemoInstall

@horat1us/bing-translator

Package Overview
Dependencies
42
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @horat1us/bing-translator

## Using in Code ```javascript import { BingTranslator } from "@horat1us/bing-translator";


Version published
Weekly downloads
41
increased by105%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Bing Microsoft Translator

Using in Code

import { BingTranslator } from "@horat1us/bing-translator";

const translator = new BingTranslator({source: "en", target: "uk"});
translator.evaluate('Hello, World!')
    .then((translated) => {
        console.log(translated);
        return translator.release();
    })
    .catch((error) => console.error(error));

CLI Package

npm i -g @horat1us/bing-translator

cat ~/document.txt | bing-translate
## or interactive
bing-translate

From sources

Local NodeJS and Chromium

Requires NodeJS >=12, Chrome installed.

git clone https://github.com/Horat1us/bing-translator.git
npm i
npm test
npm start
cat ./document.txt | npm start

Docker

## Install Dependencies
docker run -w $PWD -v $PWD:$PWD -e BROWSER_ARGS="--no-sandbox" catsoss/node-headless-chrome:13.6.0-1 npm i
## Execute Tests
docker run -w $PWD -v $PWD:$PWD -e BROWSER_ARGS="--no-sandbox" catsoss/node-headless-chrome:13.6.0-1 npm test
## Translate Texts from user input
docker run -it -w $PWD -v $PWD:$PWD -e BROWSER_ARGS="--no-sandbox" catsoss/node-headless-chrome:13.6.0-1 npm start
### or
docker run -it -w $PWD -v $PWD:$PWD -e BROWSER_ARGS="--no-sandbox" catsoss/node-headless-chrome:13.6.0-1 bash -c "cat ./document.txt | npm start" 

FAQs

Last updated on 26 Jan 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc