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

hoist-non-react-statics

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

hoist-non-react-statics - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

13

index.js

@@ -18,6 +18,15 @@ /**

var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
arguments: true,
arity: true
};
module.exports = function hoistNonReactStatics(targetComponent, sourceComponent) {
var keys = Object.keys(sourceComponent);
var keys = Object.getOwnPropertyNames(sourceComponent);
for (var i=0; i<keys.length; ++i) {
if (!REACT_STATICS[keys[i]]) {
if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]]) {
targetComponent[keys[i]] = sourceComponent[keys[i]];

@@ -24,0 +33,0 @@ }

2

package.json
{
"name": "hoist-non-react-statics",
"version": "1.0.2",
"version": "1.0.3",
"description": "Copies non-react specific statics from a child component to a parent component",

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

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