Socket
Socket
Sign inDemoInstall

redux

Package Overview
Dependencies
3
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.0 to 3.2.1

109

dist/redux.js

@@ -60,5 +60,4 @@ (function webpackUniversalModuleDefinition(root, factory) {

exports.__esModule = true;
exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createStore = __webpack_require__(2);

@@ -84,6 +83,8 @@

var _utilsWarning = __webpack_require__(3);
var _warning = __webpack_require__(3);
var _utilsWarning2 = _interopRequireDefault(_utilsWarning);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/*

@@ -96,10 +97,10 @@ * This is a dummy function to check if the function name has been altered by minification.

if (("development") !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
_utilsWarning2['default']('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
(0, _warning2["default"])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
}
exports.createStore = _createStore2['default'];
exports.combineReducers = _combineReducers2['default'];
exports.bindActionCreators = _bindActionCreators2['default'];
exports.applyMiddleware = _applyMiddleware2['default'];
exports.compose = _compose2['default'];
exports.createStore = _createStore2["default"];
exports.combineReducers = _combineReducers2["default"];
exports.bindActionCreators = _bindActionCreators2["default"];
exports.applyMiddleware = _applyMiddleware2["default"];
exports.compose = _compose2["default"];

@@ -110,2 +111,6 @@ /***/ },

"use strict";
exports.__esModule = true;
exports["default"] = compose;
/**

@@ -118,7 +123,2 @@ * Composes single-argument functions from right to left.

*/
"use strict";
exports.__esModule = true;
exports["default"] = compose;
function compose() {

@@ -131,3 +131,3 @@ for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {

if (funcs.length === 0) {
return arguments[0];
return arguments.length <= 0 ? undefined : arguments[0];
}

@@ -144,4 +144,2 @@

module.exports = exports["default"];
/***/ },

@@ -154,9 +152,10 @@ /* 2 */

exports.__esModule = true;
exports['default'] = createStore;
exports.ActionTypes = undefined;
exports["default"] = createStore;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isPlainObject = __webpack_require__(4);
var _lodashIsPlainObject = __webpack_require__(4);
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _lodashIsPlainObject2 = _interopRequireDefault(_lodashIsPlainObject);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -169,7 +168,6 @@ /**

*/
var ActionTypes = {
var ActionTypes = exports.ActionTypes = {
INIT: '@@redux/INIT'
};
exports.ActionTypes = ActionTypes;
/**

@@ -200,3 +198,2 @@ * Creates a Redux store that holds the state tree.

*/
function createStore(reducer, initialState, enhancer) {

@@ -313,3 +310,3 @@ if (typeof initialState === 'function' && typeof enhancer === 'undefined') {

function dispatch(action) {
if (!_lodashIsPlainObject2['default'](action)) {
if (!(0, _isPlainObject2["default"])(action)) {
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');

@@ -377,2 +374,6 @@ }

'use strict';
exports.__esModule = true;
exports["default"] = warning;
/**

@@ -384,7 +385,2 @@ * Prints a warning in the console if it exists.

*/
'use strict';
exports.__esModule = true;
exports['default'] = warning;
function warning(message) {

@@ -405,4 +401,2 @@ /* eslint-disable no-console */

module.exports = exports['default'];
/***/ },

@@ -481,3 +475,3 @@ /* 4 */

/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()) || Function('return this')()))
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))

@@ -490,10 +484,7 @@ /***/ },

exports.__esModule = true;
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; };
exports['default'] = applyMiddleware;
exports.__esModule = true;
exports["default"] = applyMiddleware;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _compose = __webpack_require__(1);

@@ -503,2 +494,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**

@@ -520,3 +513,2 @@ * Creates a store enhancer that applies middleware to the dispatch method

*/
function applyMiddleware() {

@@ -542,3 +534,3 @@ for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {

});
_dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch);
_dispatch = _compose2["default"].apply(undefined, chain)(store.dispatch);

@@ -552,4 +544,2 @@ return _extends({}, store, {

module.exports = exports['default'];
/***/ },

@@ -562,3 +552,3 @@ /* 6 */

exports.__esModule = true;
exports['default'] = bindActionCreators;
exports["default"] = bindActionCreators;
function bindActionCreator(actionCreator, dispatch) {

@@ -591,3 +581,2 @@ return function () {

*/
function bindActionCreators(actionCreators, dispatch) {

@@ -614,4 +603,2 @@ if (typeof actionCreators === 'function') {

module.exports = exports['default'];
/***/ },

@@ -624,16 +611,16 @@ /* 7 */

exports.__esModule = true;
exports['default'] = combineReducers;
exports["default"] = combineReducers;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createStore = __webpack_require__(2);
var _lodashIsPlainObject = __webpack_require__(4);
var _isPlainObject = __webpack_require__(4);
var _lodashIsPlainObject2 = _interopRequireDefault(_lodashIsPlainObject);
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _utilsWarning = __webpack_require__(3);
var _warning = __webpack_require__(3);
var _utilsWarning2 = _interopRequireDefault(_utilsWarning);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function getUndefinedStateErrorMessage(key, action) {

@@ -654,4 +641,4 @@ var actionType = action && action.type;

if (!_lodashIsPlainObject2['default'](inputState)) {
return 'The ' + argumentName + ' has unexpected type of "' + ({}).toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
if (!(0, _isPlainObject2["default"])(inputState)) {
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
}

@@ -700,3 +687,2 @@

*/
function combineReducers(reducers) {

@@ -720,4 +706,5 @@ var reducerKeys = Object.keys(reducers);

return function combination(state, action) {
if (state === undefined) state = {};
return function combination() {
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var action = arguments[1];

@@ -731,3 +718,3 @@ if (sanityError) {

if (warningMessage) {
_utilsWarning2['default'](warningMessage);
(0, _warning2["default"])(warningMessage);
}

@@ -754,4 +741,2 @@ }

module.exports = exports['default'];
/***/ },

@@ -758,0 +743,0 @@ /* 8 */

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Redux=e():t.Redux=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(2),u=r(o),i=n(7),c=r(i),a=n(6),f=r(a),s=n(5),d=r(s),l=n(1),p=r(l),y=n(3);r(y);e.createStore=u.default,e.combineReducers=c.default,e.bindActionCreators=f.default,e.applyMiddleware=d.default,e.compose=p.default},function(t,e){"use strict";function n(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return function(){if(0===e.length)return arguments[0];var t=e[e.length-1],n=e.slice(0,-1);return n.reduceRight(function(t,e){return e(t)},t.apply(void 0,arguments))}}e.__esModule=!0,e.default=n,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){function r(){y===p&&(y=p.slice())}function u(){return l}function a(t){if("function"!=typeof t)throw Error("Expected listener to be a function.");var e=!0;return r(),y.push(t),function(){if(e){e=!1,r();var n=y.indexOf(t);y.splice(n,1)}}}function f(t){if(!i.default(t))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(h)throw Error("Reducers may not dispatch actions.");try{h=!0,l=d(l,t)}finally{h=!1}for(var e=p=y,n=0;e.length>n;n++)e[n]();return t}function s(t){if("function"!=typeof t)throw Error("Expected the nextReducer to be a function.");d=t,f({type:c.INIT})}if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw Error("Expected the enhancer to be a function.");return n(o)(t,e)}if("function"!=typeof t)throw Error("Expected the reducer to be a function.");var d=t,l=e,p=[],y=p,h=!1;return f({type:c.INIT}),{dispatch:f,subscribe:a,getState:u,replaceReducer:s}}e.__esModule=!0,e.default=o;var u=n(4),i=r(u),c={INIT:"@@redux/INIT"};e.ActionTypes=c},function(t,e){"use strict";function n(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw Error(t)}catch(e){}}e.__esModule=!0,e.default=n,t.exports=e.default},function(t,e,n){(function(e){function r(t){if(!u(t)||s.call(t)!=i||o(t))return!1;var e=c;if("function"==typeof t.constructor&&(e=d(t)),null===e)return!0;var n=e.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==f}var o=n(8),u=n(9),i="[object Object]",c=e.Object.prototype,a=e.Function.prototype.toString,f=a.call(Object),s=c.toString,d=Object.getPrototypeOf;t.exports=r}).call(e,function(){return this}()||Function("return this")())},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return function(t){return function(n,r,o){var i=t(n,r,o),a=i.dispatch,f=[],s={getState:i.getState,dispatch:function(t){return a(t)}};return f=e.map(function(t){return t(s)}),a=c.default.apply(void 0,f)(i.dispatch),u({},i,{dispatch:a})}}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=o;var i=n(1),c=r(i);t.exports=e.default},function(t,e){"use strict";function n(t,e){return function(){return e(t.apply(void 0,arguments))}}function r(t,e){if("function"==typeof t)return n(t,e);if("object"!=typeof t||null===t)throw Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(t),o={},u=0;r.length>u;u++){var i=r[u],c=t[i];"function"==typeof c&&(o[i]=n(c,e))}return o}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n=e&&e.type,r=n&&'"'+n+'"'||"an action";return'Reducer "'+t+'" returned undefined handling '+r+". To ignore an action, you must explicitly return the previous state."}function u(t){Object.keys(t).forEach(function(e){var n=t[e],r=n(void 0,{type:c.ActionTypes.INIT});if(void 0===r)throw Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if(void 0===n(void 0,{type:o}))throw Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+c.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function i(t){for(var e=Object.keys(t),n={},r=0;e.length>r;r++){var i=e[r];"function"==typeof t[i]&&(n[i]=t[i])}var c,a=Object.keys(n);try{u(n)}catch(f){c=f}return function(t,e){if(void 0===t&&(t={}),c)throw c;for(var r=!1,u={},i=0;a.length>i;i++){var f=a[i],s=n[f],d=t[f],l=s(d,e);if(void 0===l){var p=o(f,e);throw Error(p)}u[f]=l,r=r||l!==d}return r?u:t}}e.__esModule=!0,e.default=i;var c=n(2),a=n(4),f=(r(a),n(3));r(f);t.exports=e.default},function(t,e){function n(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}t.exports=n},function(t,e){function n(t){return!!t&&"object"==typeof t}t.exports=n}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Redux=e():t.Redux=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.compose=e.applyMiddleware=e.bindActionCreators=e.combineReducers=e.createStore=void 0;var o=n(2),i=r(o),u=n(7),c=r(u),a=n(6),f=r(a),s=n(5),d=r(s),l=n(1),p=r(l),y=n(3);r(y);e.createStore=i["default"],e.combineReducers=c["default"],e.bindActionCreators=f["default"],e.applyMiddleware=d["default"],e.compose=p["default"]},function(t,e){"use strict";function n(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return function(){if(0===e.length)return arguments.length>0?arguments[0]:void 0;var t=e[e.length-1],n=e.slice(0,-1);return n.reduceRight(function(t,e){return e(t)},t.apply(void 0,arguments))}}e.__esModule=!0,e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){function r(){y===p&&(y=p.slice())}function i(){return l}function a(t){if("function"!=typeof t)throw Error("Expected listener to be a function.");var e=!0;return r(),y.push(t),function(){if(e){e=!1,r();var n=y.indexOf(t);y.splice(n,1)}}}function f(t){if(!(0,u["default"])(t))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(h)throw Error("Reducers may not dispatch actions.");try{h=!0,l=d(l,t)}finally{h=!1}for(var e=p=y,n=0;e.length>n;n++)e[n]();return t}function s(t){if("function"!=typeof t)throw Error("Expected the nextReducer to be a function.");d=t,f({type:c.INIT})}if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw Error("Expected the enhancer to be a function.");return n(o)(t,e)}if("function"!=typeof t)throw Error("Expected the reducer to be a function.");var d=t,l=e,p=[],y=p,h=!1;return f({type:c.INIT}),{dispatch:f,subscribe:a,getState:i,replaceReducer:s}}e.__esModule=!0,e.ActionTypes=void 0,e["default"]=o;var i=n(4),u=r(i),c=e.ActionTypes={INIT:"@@redux/INIT"}},function(t,e){"use strict";function n(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw Error(t)}catch(e){}}e.__esModule=!0,e["default"]=n},function(t,e,n){(function(e){function r(t){if(!i(t)||s.call(t)!=u||o(t))return!1;var e=c;if("function"==typeof t.constructor&&(e=d(t)),null===e)return!0;var n=e.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==f}var o=n(8),i=n(9),u="[object Object]",c=e.Object.prototype,a=e.Function.prototype.toString,f=a.call(Object),s=c.toString,d=Object.getPrototypeOf;t.exports=r}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return function(t){return function(n,r,o){var u=t(n,r,o),a=u.dispatch,f=[],s={getState:u.getState,dispatch:function(t){return a(t)}};return f=e.map(function(t){return t(s)}),a=c["default"].apply(void 0,f)(u.dispatch),i({},u,{dispatch:a})}}}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.__esModule=!0,e["default"]=o;var u=n(1),c=r(u)},function(t,e){"use strict";function n(t,e){return function(){return e(t.apply(void 0,arguments))}}function r(t,e){if("function"==typeof t)return n(t,e);if("object"!=typeof t||null===t)throw Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(t),o={},i=0;r.length>i;i++){var u=r[i],c=t[u];"function"==typeof c&&(o[u]=n(c,e))}return o}e.__esModule=!0,e["default"]=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n=e&&e.type,r=n&&'"'+n+'"'||"an action";return'Reducer "'+t+'" returned undefined handling '+r+". To ignore an action, you must explicitly return the previous state."}function i(t){Object.keys(t).forEach(function(e){var n=t[e],r=n(void 0,{type:c.ActionTypes.INIT});if(void 0===r)throw Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if(void 0===n(void 0,{type:o}))throw Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+c.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function u(t){for(var e=Object.keys(t),n={},r=0;e.length>r;r++){var u=e[r];"function"==typeof t[u]&&(n[u]=t[u])}var c,a=Object.keys(n);try{i(n)}catch(f){c=f}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(c)throw c;for(var r=!1,i={},u=0;a.length>u;u++){var f=a[u],s=n[f],d=t[f],l=s(d,e);if(void 0===l){var p=o(f,e);throw Error(p)}i[f]=l,r=r||l!==d}return r?i:t}}e.__esModule=!0,e["default"]=u;var c=n(2),a=n(4),f=(r(a),n(3));r(f)},function(t,e){function n(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}t.exports=n},function(t,e){function n(t){return!!t&&"object"==typeof t}t.exports=n}])});
'use strict';
exports.__esModule = true;
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; };
exports['default'] = applyMiddleware;
exports.__esModule = true;
exports["default"] = applyMiddleware;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _compose = require('./compose');

@@ -15,2 +12,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**

@@ -32,3 +31,2 @@ * Creates a store enhancer that applies middleware to the dispatch method

*/
function applyMiddleware() {

@@ -54,3 +52,3 @@ for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {

});
_dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch);
_dispatch = _compose2["default"].apply(undefined, chain)(store.dispatch);

@@ -62,4 +60,2 @@ return _extends({}, store, {

};
}
module.exports = exports['default'];
}
'use strict';
exports.__esModule = true;
exports['default'] = bindActionCreators;
exports["default"] = bindActionCreators;
function bindActionCreator(actionCreator, dispatch) {

@@ -32,3 +32,2 @@ return function () {

*/
function bindActionCreators(actionCreators, dispatch) {

@@ -53,4 +52,2 @@ if (typeof actionCreators === 'function') {

return boundActionCreators;
}
module.exports = exports['default'];
}
'use strict';
exports.__esModule = true;
exports['default'] = combineReducers;
exports["default"] = combineReducers;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createStore = require('./createStore');
var _lodashIsPlainObject = require('lodash/isPlainObject');
var _isPlainObject = require('lodash/isPlainObject');
var _lodashIsPlainObject2 = _interopRequireDefault(_lodashIsPlainObject);
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _utilsWarning = require('./utils/warning');
var _warning = require('./utils/warning');
var _utilsWarning2 = _interopRequireDefault(_utilsWarning);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function getUndefinedStateErrorMessage(key, action) {

@@ -33,4 +33,4 @@ var actionType = action && action.type;

if (!_lodashIsPlainObject2['default'](inputState)) {
return 'The ' + argumentName + ' has unexpected type of "' + ({}).toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
if (!(0, _isPlainObject2["default"])(inputState)) {
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
}

@@ -79,3 +79,2 @@

*/
function combineReducers(reducers) {

@@ -99,4 +98,5 @@ var reducerKeys = Object.keys(reducers);

return function combination(state, action) {
if (state === undefined) state = {};
return function combination() {
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var action = arguments[1];

@@ -110,3 +110,3 @@ if (sanityError) {

if (warningMessage) {
_utilsWarning2['default'](warningMessage);
(0, _warning2["default"])(warningMessage);
}

@@ -131,4 +131,2 @@ }

};
}
module.exports = exports['default'];
}

@@ -0,1 +1,5 @@

"use strict";
exports.__esModule = true;
exports["default"] = compose;
/**

@@ -8,7 +12,2 @@ * Composes single-argument functions from right to left.

*/
"use strict";
exports.__esModule = true;
exports["default"] = compose;
function compose() {

@@ -21,3 +20,3 @@ for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {

if (funcs.length === 0) {
return arguments[0];
return arguments.length <= 0 ? undefined : arguments[0];
}

@@ -32,4 +31,2 @@

};
}
module.exports = exports["default"];
}
'use strict';
exports.__esModule = true;
exports['default'] = createStore;
exports.ActionTypes = undefined;
exports["default"] = createStore;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isPlainObject = require('lodash/isPlainObject');
var _lodashIsPlainObject = require('lodash/isPlainObject');
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
var _lodashIsPlainObject2 = _interopRequireDefault(_lodashIsPlainObject);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -18,7 +19,6 @@ /**

*/
var ActionTypes = {
var ActionTypes = exports.ActionTypes = {
INIT: '@@redux/INIT'
};
exports.ActionTypes = ActionTypes;
/**

@@ -49,3 +49,2 @@ * Creates a Redux store that holds the state tree.

*/
function createStore(reducer, initialState, enhancer) {

@@ -162,3 +161,3 @@ if (typeof initialState === 'function' && typeof enhancer === 'undefined') {

function dispatch(action) {
if (!_lodashIsPlainObject2['default'](action)) {
if (!(0, _isPlainObject2["default"])(action)) {
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');

@@ -165,0 +164,0 @@ }

'use strict';
exports.__esModule = true;
exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createStore = require('./createStore');

@@ -27,6 +26,8 @@

var _utilsWarning = require('./utils/warning');
var _warning = require('./utils/warning');
var _utilsWarning2 = _interopRequireDefault(_utilsWarning);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/*

@@ -39,9 +40,9 @@ * This is a dummy function to check if the function name has been altered by minification.

if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
_utilsWarning2['default']('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
(0, _warning2["default"])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
}
exports.createStore = _createStore2['default'];
exports.combineReducers = _combineReducers2['default'];
exports.bindActionCreators = _bindActionCreators2['default'];
exports.applyMiddleware = _applyMiddleware2['default'];
exports.compose = _compose2['default'];
exports.createStore = _createStore2["default"];
exports.combineReducers = _combineReducers2["default"];
exports.bindActionCreators = _bindActionCreators2["default"];
exports.applyMiddleware = _applyMiddleware2["default"];
exports.compose = _compose2["default"];

@@ -0,1 +1,5 @@

'use strict';
exports.__esModule = true;
exports["default"] = warning;
/**

@@ -7,7 +11,2 @@ * Prints a warning in the console if it exists.

*/
'use strict';
exports.__esModule = true;
exports['default'] = warning;
function warning(message) {

@@ -26,4 +25,2 @@ /* eslint-disable no-console */

/* eslint-enable no-empty */
}
module.exports = exports['default'];
}
{
"name": "redux",
"version": "3.2.0",
"version": "3.2.1",
"description": "Predictable state container for JavaScript apps",

@@ -15,3 +15,3 @@ "main": "lib/index.js",

"lint": "eslint src test examples",
"test": "mocha --compilers js:babel/register --recursive",
"test": "mocha --compilers js:babel-register --recursive",
"test:watch": "npm test -- --watch",

@@ -26,6 +26,3 @@ "test:cov": "babel-node $(npm bin)/isparta cover $(npm bin)/_mocha -- --recursive",

"build": "npm run build:lib && npm run build:umd && npm run build:umd:min",
"preversion": "npm run clean && npm run check",
"version": "npm run build",
"postversion": "git push && git push --tags && npm run clean && npm run docs:publish",
"prepublish": "npm run clean && npm run build",
"prepublish": "npm run clean && npm run build && npm run check && node ./prepublish",
"docs:clean": "rimraf _book",

@@ -64,11 +61,32 @@ "docs:prepare": "gitbook install",

"dependencies": {
"lodash": "^4.1.0",
"lodash": "^4.2.0",
"loose-envify": "^1.1.0"
},
"devDependencies": {
"babel": "^5.5.8",
"babel-core": "^5.6.18",
"babel-eslint": "^4.1.0",
"babel-loader": "^5.1.4",
"babel-cli": "^6.3.15",
"babel-core": "^6.3.15",
"babel-eslint": "^4.1.6",
"babel-loader": "^6.2.0",
"babel-plugin-check-es2015-constants": "^6.3.13",
"babel-plugin-transform-es2015-arrow-functions": "^6.3.13",
"babel-plugin-transform-es2015-block-scoped-functions": "^6.3.13",
"babel-plugin-transform-es2015-block-scoping": "^6.3.13",
"babel-plugin-transform-es2015-classes": "^6.3.13",
"babel-plugin-transform-es2015-computed-properties": "^6.3.13",
"babel-plugin-transform-es2015-destructuring": "^6.3.13",
"babel-plugin-transform-es2015-for-of": "^6.3.13",
"babel-plugin-transform-es2015-function-name": "^6.3.13",
"babel-plugin-transform-es2015-literals": "^6.3.13",
"babel-plugin-transform-es2015-modules-commonjs": "^6.3.13",
"babel-plugin-transform-es2015-object-super": "^6.3.13",
"babel-plugin-transform-es2015-parameters": "^6.3.13",
"babel-plugin-transform-es2015-shorthand-properties": "^6.3.13",
"babel-plugin-transform-es2015-spread": "^6.3.13",
"babel-plugin-transform-es2015-sticky-regex": "^6.3.13",
"babel-plugin-transform-es2015-template-literals": "^6.3.13",
"babel-plugin-transform-es2015-unicode-regex": "^6.3.13",
"babel-plugin-transform-object-rest-spread": "^6.3.13",
"babel-register": "^6.3.13",
"cross-env": "^1.0.7",
"es3ify": "^0.2.0",
"eslint": "^1.10.3",

@@ -79,3 +97,4 @@ "eslint-config-rackt": "^1.1.1",

"gitbook-cli": "^0.3.4",
"isparta": "^3.0.3",
"glob": "^6.0.4",
"isparta": "^4.0.0",
"mocha": "^2.2.5",

@@ -82,0 +101,0 @@ "rimraf": "^2.3.4",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc