Huge News!Announcing our $40M Series B led by Abstract Ventures.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.7.0 to 1.8.0

2

lib/index.d.ts

@@ -46,2 +46,4 @@ import Tree, { WordTranslations, TreeOptions } from './Tree';

setLocale(locale: string): void;
addWords(words: WordTranslations): void;
addTexts(texts: WordTranslations): void;
private _branch;

@@ -48,0 +50,0 @@ private replaceVariables;

@@ -98,2 +98,8 @@ "use strict";

}
addWords(words) {
Object.keys(words).forEach(key => this.tree.addText(key, words[key]));
}
addTexts(texts) {
Object.keys(texts).forEach(key => this.tree.addText(key, texts[key]));
}
_branch(wordOrText, isText = false) {

@@ -100,0 +106,0 @@ if (!isText) {

2

package.json
{
"name": "@ewb/translate",
"version": "1.7.0",
"version": "1.8.0",
"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",

@@ -135,2 +135,10 @@ import Tree, { WordTranslations, TreeOptions } from './Tree';

public addWords(words: WordTranslations) {
Object.keys(words).forEach(key => this.tree.addText(key, words[key]));
}
public addTexts(texts: WordTranslations) {
Object.keys(texts).forEach(key => this.tree.addText(key, texts[key]));
}
private _branch(wordOrText: string, isText = false) {

@@ -137,0 +145,0 @@ if (!isText) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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