New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ewb/translate

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ewb/translate - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "@ewb/translate",
"version": "1.1.1",
"version": "1.1.2",
"description": "Translate as you create your app. Saves the words and text in a tree structure for fast and easy lookup.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -18,3 +18,10 @@ # Translate library

```
const translation = new Translation({
npm install @ewb/translate
yarn add @ewb/translate
```
```
const Translate from '@ewb/translate';
const translate = new Translate({
defaultLocale: 'en',

@@ -74,11 +81,11 @@ locale: 'no-nb',

```
translation.word('Word'); // Ord
translation.text('This is a sentence'); // Dette er en setning
translate.word('Word'); // Ord
translate.text('This is a sentence'); // Dette er en setning
translation.word('Word', 'en'); // Word
translation.text('This is a sentence', 'en'); // Dette er en setning
translate.word('Word', 'en'); // Word
translate.text('This is a sentence', 'en'); // Dette er en setning
translation.setLocale('en');
translation.word('Worry') // Worry
translation.text('This is not a sentence') // This is not a sentence
translate.setLocale('en');
translate.word('Worry') // Worry
translate.text('This is not a sentence') // This is not a sentence
```

@@ -98,3 +105,3 @@

```
new Translate({
const translate = new Translate({
....,

@@ -104,3 +111,3 @@ noWord: (translate: Translate, empty: Empty) => { ... Handle 'N/W' },

})
tranlsate('No match')
translate('No match')
```

@@ -107,0 +114,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc