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

@shopify/react-compose

Package Overview
Dependencies
Maintainers
10
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/react-compose - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

14

dist/index.js

@@ -13,13 +13,5 @@ "use strict";

return function wrapComponent(OriginalComponent) {
var result;
if (wrappingFunctions.length === 0) {
result = OriginalComponent;
}
else {
result = wrappingFunctions.reduce(function (wrappingFunctionA, wrappingFunctionB) {
return function (WrappingComponent) {
return wrappingFunctionA(wrappingFunctionB(WrappingComponent));
};
})(OriginalComponent);
}
var result = wrappingFunctions.reduceRight(function (component, wrappingFunction) {
return wrappingFunction(component);
}, OriginalComponent);
return hoist_non_react_statics_1.default(result, OriginalComponent);

@@ -26,0 +18,0 @@ };

{
"name": "@shopify/react-compose",
"version": "0.1.7",
"version": "0.1.8",
"license": "MIT",

@@ -33,3 +33,2 @@ "description": "Cleanly compose multiple component enhancers together with minimal fuss",

"@types/enzyme": "^3.1.10",
"enzyme": "^3.3.0",
"typescript": "~3.0.1"

@@ -36,0 +35,0 @@ },

@@ -17,15 +17,8 @@ import * as React from 'react';

): ReactComponent<Props> & C {
let result: ReactComponent<ComposedProps>;
const result: ReactComponent<ComposedProps> = wrappingFunctions.reduceRight(
(component: ReactComponent<any>, wrappingFunction: WrappingFunction) =>
wrappingFunction(component),
OriginalComponent,
);
if (wrappingFunctions.length === 0) {
result = OriginalComponent;
} else {
result = wrappingFunctions.reduce(
(wrappingFunctionA, wrappingFunctionB) => {
return (WrappingComponent: ReactComponent<any>) =>
wrappingFunctionA(wrappingFunctionB(WrappingComponent));
},
)(OriginalComponent);
}
return hoistStatics(

@@ -32,0 +25,0 @@ result as ComponentClass,

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