Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@toil/translate
Advanced tools
A library for free and not only using various translation APIs, which supports working with JavaScript, TypeScript, and also has built-in separated types for Typebox.
Installation via Bun:
bun add @toil/translate
Installation via NPM:
npm install @toil/translate
To start working with the API, you need to create a Translation Client. This can be done using the code provided below.
const client = new TranslationClient({
service: TranslationService.yandexbrowser,
});
const translatedResult = await client.translate(
"The quick brown fox jumps over the lazy dog",
);
const detectResult = await client.detect(
"The quick brown fox jumps over the lazy dog",
);
const langs = await client.getLangs(
"The quick brown fox jumps over the lazy dog",
);
You can see more code examples here
Status | Service | Functions | Limits |
---|---|---|---|
✅ | YandexBrowser | Translate Detect GetLangs | 10k chars/req 10k chars/req |
✅ | YandexCloud | Translate Detect GetLangs | 2k chars/req 1k chars/req |
✅ | YandexTranslate | Translate Detect GetLangs | 10k chars/req 10k chars/req |
✅ | MSEdge | Translate Detect GetLangs | 50k chars/req 50k chars/req |
To build, you must have:
Don't forget to install the dependencies:
bun install
Building the entire package:
bun build:bun
You can use this build option if you only want to build types for TypeBox:
bun build:typebox
The library has minimal test coverage to check it's performance.
Run the tests:
bun test
1.0.2
FAQs
A library for free and not only using various translation APIs
The npm package @toil/translate receives a total of 59 weekly downloads. As such, @toil/translate popularity was classified as not popular.
We found that @toil/translate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.