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

react-i13n

Package Overview
Dependencies
Maintainers
6
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 2.0.2 to 2.0.3

10

dist/utils/createI13nNode.js

@@ -15,5 +15,8 @@ /* global process */

* @param {Object|String} Component the component you want to create a i13nNode
* @param {Object} defaultProps default props
* @param {Object} options
* @param {Object} options.displayName
* @method createI13nNode
*/
module.exports = function createI13nNode (Component, options) {
module.exports = function createI13nNode (Component, defaultProps, options) {
if (!Component) {

@@ -27,6 +30,7 @@ if ('production' !== process.env.NODE_ENV) {

var componentName = Component.displayName || Component.name || Component;
defaultProps = defaultProps || {};
options = options || {};
var I13nComponent = React.createClass({
displayName: 'I13n' + componentName,
displayName: options.displayName || ('I13n' + componentName),
mixins: [I13nMixin],

@@ -48,3 +52,3 @@ autobind: false,

scanLinks: null
}, options);
}, defaultProps);
},

@@ -51,0 +55,0 @@

@@ -18,2 +18,3 @@ /**

* @param {Object} options.i13nNodeClass the i13nNode class, you can inherit it with your own functionalities
* @param {Object} options.displayName display name of the wrapper component
* @param {Array} plugins plugins

@@ -23,2 +24,4 @@ * @method setupI13n

module.exports = function setupI13n (Component, options, plugins) {
options = options || {};
plugins = plugins || [];
var RootI13nComponent;

@@ -36,3 +39,3 @@ var componentName = Component.displayName || Component.name;

displayName: 'RootI13n' + componentName,
displayName: options.displayName || ('RootI13n' + componentName),

@@ -39,0 +42,0 @@ autobind: false,

{
"name": "react-i13n",
"description": "React I13n provides a performant and scalable solution to application instrumentation.",
"version": "2.0.2",
"version": "2.0.3",
"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