New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

one-translator

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

one-translator

A simple and practical way to translate texts and file texts!

latest
npmnpm
Version
1.1.3
Version published
Maintainers
2
Created
Source

A simple and practical way to translate texts and file texts!

Usage

1. Require the one-translator

        const { translate, translateFile } = require('one-translator').default

Using it


        console.log(await translate(`from`, `to`, `text`)) 
           
        translate(`from`, `to`, `text`).then((data) => {
                console.log(data)
        })

Translate Files

	## Without saving
				console.log(await translateFile('en', 'pt-br', 'teste.txt'))

	## Saving
			console.log(await translateFile('en', 'pt-br', 'teste.txt', {
				save: true,
				savePath: './text2.txt'
			}))

save: boolean not required, default false savePath: string not required, default your path

Keywords

translate

FAQs

Package last updated on 12 Apr 2021

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