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

react-curry

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-curry - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

18

lib2/index.js

@@ -1,11 +0,1 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = require('react');
var _react2 = _interopRequireDefault(_react);

@@ -17,10 +7,12 @@

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
exports.default = function (ComponentOrElementName, preProps) {
var merged = _extends({}, (0, _lodash.merge)(preProps, props));
var merged = {};
return typeof ComponentOrElementName === 'string' ? function (props) {
return _react2.default.createElement(ComponentOrElementName, merged);
return _react2.default.createElement.apply(_react2.default, [ComponentOrElementName].concat(_toConsumableArray((0, _lodash.merge)(preProps, props))));
} : function (props) {
return _react2.default.createElement(Component, merged);
return _react2.default.createElement(Component, (0, _lodash.merge)(preProps, props));
};
};
{
"name": "react-curry",
"version": "1.1.1",
"version": "1.1.2",
"description": "react stateless component curry",

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

@@ -5,7 +5,7 @@ import React from 'react';

export default (ComponentOrElementName, preProps) => {
const merged = { ...merge(preProps, props) };
const merged = { };
return (typeof ComponentOrElementName === 'string')
? (props) => React.createElement(ComponentOrElementName, merged)
: (props) => <Component {...merged} />
? (props) => React.createElement(ComponentOrElementName, ...merge(preProps, props))
: (props) => <Component {...merge(preProps, props)} />
};
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