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

redux-dryer

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-dryer - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

16

dist/generate-reducer.js

@@ -15,8 +15,16 @@ 'use strict';

var _merge = require('lodash/merge');
var _mergeWith = require('lodash/mergeWith');
var _merge2 = _interopRequireDefault(_merge);
var _mergeWith2 = _interopRequireDefault(_mergeWith);
var _isArray = require('lodash/isArray');
var _isArray2 = _interopRequireDefault(_isArray);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function overwriteArray(obj, src) {
if (_isArray2.default) return src;
}
var generateReducer = function generateReducer(initialState, generatedActions) {

@@ -31,5 +39,5 @@ // save actionsTypes in an array to avoid re-iteration

var action = arguments[1];
return (0, _includes2.default)(actionsTypes, action.type) ? (0, _merge2.default)({}, state,
return (0, _includes2.default)(actionsTypes, action.type) ? (0, _mergeWith2.default)({}, state,
// if the payload is a function we'll inject state into it
typeof action.payload === 'function' ? action.payload(state) : action.payload) : state;
typeof action.payload === 'function' ? action.payload(state) : action.payload, overwriteArray) : state;
};

@@ -36,0 +44,0 @@ };

{
"name": "redux-dryer",
"version": "0.2.0",
"version": "0.2.1",
"description": "Redux utilities to keep your reducers small and DRY",

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

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