UNPKG

@warp-works/warpjs-utils

Version:

Utility functions for WarpJS and plugins

16 lines (13 loc) 470 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function () { var actionTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var reducer = arguments[1]; return function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments[1]; return actionTypes.indexOf(action.type) === -1 ? state : reducer(state, action); }; };