redux-dryer
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -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 _map = require('lodash/map'); | ||
@@ -18,2 +16,6 @@ | ||
var _merge = require('lodash/merge'); | ||
var _merge2 = _interopRequireDefault(_merge); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -30,3 +32,5 @@ | ||
var action = arguments[1]; | ||
return (0, _includes2.default)(actionsTypes, action.type) ? _extends({}, state, typeof action.payload === 'function' ? action.payload(state) : action.payload) : state; | ||
return (0, _includes2.default)(actionsTypes, action.type) ? (0, _merge2.default)(state, | ||
// if the payload is a function we'll inject state into it | ||
typeof action.payload === 'function' ? action.payload(state) : action.payload) : state; | ||
}; | ||
@@ -33,0 +37,0 @@ }; |
{ | ||
"name": "redux-dryer", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Redux utilities to keep your reducers small and DRY", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
2605
89573