react-curry
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -11,3 +11,3 @@ 'use strict'; | ||
var _lodash = require('lodash'); | ||
var _ramda = require('ramda'); | ||
@@ -17,8 +17,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = function (ComponentOrElementName, preProps) { | ||
return typeof ComponentOrElementName === 'string' ? function (props) { | ||
return _react2.default.createElement(ComponentOrElementName, (0, _lodash.merge)(preProps, props)); | ||
} : function (props) { | ||
return _react2.default.createElement(ComponentOrElementName, (0, _lodash.merge)(preProps, props)); | ||
return function (props) { | ||
return typeof ComponentOrElementName === 'string' ? _react2.default.createElement(ComponentOrElementName, (0, _ramda.mergeDeepLeft)(preProps, props)) : _react2.default.createElement(ComponentOrElementName, (0, _ramda.mergeDeepLeft)(preProps, props)); | ||
}; | ||
}; | ||
}; |
{ | ||
"name": "react-curry", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "react stateless component curry", | ||
@@ -5,0 +5,0 @@ "main": "./lib2/index.js", |
import React from 'react'; | ||
import { mergeDeepLeft } from 'ramda'; | ||
export default (ComponentOrElementName, preProps) => | ||
export default (ComponentOrElementName, preProps) => (props) => | ||
(typeof ComponentOrElementName === 'string') | ||
? (props) => React.createElement(ComponentOrElementName, mergeDeepLeft(preProps, props)) | ||
: (props) => <ComponentOrElementName {...mergeDeepLeft(preProps, props)} /> | ||
? React.createElement(ComponentOrElementName, mergeDeepLeft(preProps, props)) | ||
: <ComponentOrElementName {...mergeDeepLeft(preProps, props)} /> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44023
32