Socket
Socket
Sign inDemoInstall

hoist-non-react-statics

Package Overview
Dependencies
0
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

8

index.js

@@ -27,5 +27,13 @@ /**

var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function';
module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) {
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
var keys = Object.getOwnPropertyNames(sourceComponent);
/* istanbul ignore else */
if (isGetOwnPropertySymbolsAvailable) {
keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent));
}
for (var i = 0; i < keys.length; ++i) {

@@ -32,0 +40,0 @@ if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) {

2

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

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

@@ -29,3 +29,3 @@ # hoist-non-react-statics

|--------------------------|-------------------------------|
| 0.13-0.14 | >= 1.0.0 |
| 0.13-15.0 | >= 1.0.0 |

@@ -32,0 +32,0 @@ ## License

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc