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.5 to 1.1.6

10

lib/index.js

@@ -7,4 +7,2 @@ 'use strict';

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');

@@ -14,3 +12,3 @@

var _lodash = require('lodash');
var _ramda = require('ramda');

@@ -20,9 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function (ComponentOrElementName, preProps) {
var merged = _extends({}, (0, _lodash.merge)(preProps, props));
return typeof ComponentOrElementName === 'string' ? function (props) {
return _react2.default.createElement(ComponentOrElementName, merged);
return _react2.default.createElement(ComponentOrElementName, (0, _ramda.mergeDeepLeft)(preProps, props));
} : function (props) {
return _react2.default.createElement(Component, merged);
return _react2.default.createElement(ComponentOrElementName, (0, _ramda.mergeDeepLeft)(preProps, props));
};
};
{
"name": "react-curry",
"version": "1.1.5",
"version": "1.1.6",
"description": "react stateless component curry",

@@ -21,3 +21,3 @@ "main": "./lib2/index.js",

"dependencies": {
"lodash": "*",
"ramda": "^0.24.1",
"react": ">=14.0.0"

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

import React from 'react';
import { merge } from 'lodash';
import { mergeDeepLeft } from 'ramda';
export default (ComponentOrElementName, preProps) => {
return (typeof ComponentOrElementName === 'string')
? (props) => React.createElement(ComponentOrElementName, merge(preProps, props))
: (props) => <ComponentOrElementName {...merge(preProps, props)} />
};
export default (ComponentOrElementName, preProps) =>
(typeof ComponentOrElementName === 'string')
? (props) => React.createElement(ComponentOrElementName, mergeDeepLeft(preProps, props))
: (props) => <ComponentOrElementName {...mergeDeepLeft(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