Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-i13n

Package Overview
Dependencies
Maintainers
5
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-i13n - npm Package Compare versions

Comparing version 0.1.22 to 0.1.23

16

dist/libs/I13nNode.js

@@ -16,3 +16,3 @@ /**

* @param {Object} parentNode parent node
* @param {Object} model custom model values
* @param {Object|Function} model custom model values
* @param {Boolean} isLeafNode indicate if it's a link node

@@ -286,2 +286,16 @@ * @param {Boolean} isViewportEnabled indicate if viewport check enable

/**
* Update the i13n model
* @method updateModel
* @param {Object|Function} newModel the new i13n model
*/
I13nNode.prototype.updateModel = function updateModel (newModel) {
// if i13n is a function, just assign it to _model, otherwise use object-assign to merge old and new model data
if ('function' === typeof newModel) {
this._model = newModel;
} else {
this._model = objectAssign({}, this._model, newModel);
}
};
/**
* Sort children according to the position in the page

@@ -288,0 +302,0 @@ * @method sortChildrenNodes

@@ -80,2 +80,12 @@ /**

/**
* componentWillUpdate
* @method componentWillUpdate
*/
componentWillUpdate: function (nextProps, nextState) {
if (nextProps) {
this._i13nNode.updateModel(nextProps.model || nextProps.i13nModel);
}
},
/**
* componentDidMount

@@ -82,0 +92,0 @@ * @method componentDidMount

2

package.json
{
"name": "react-i13n",
"description": "React I13n provides a performant and scalable solution to application instrumentation.",
"version": "0.1.22",
"version": "0.1.23",
"main": "index.js",

@@ -6,0 +6,0 @@ "repository": {

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