|
@@ -3,7 +3,7 @@
|
|
Object.defineProperty(exports, "__esModule", {
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
value: true
|
|
});
|
|
});
|
|
-exports.subReducer = undefined;
|
|
|
|
|
|
+exports.composeReducers = exports.subReducer = undefined;
|
|
|
|
|
|
var _cowValueModel2 = require("./cow-value-model");
|
|
var _cowValueModel2 = require("./cow-value-model");
|
|
|
|
|
|
@@ -30,4 +30,16 @@ var subReducer = exports.subReducer = function subReducer(key, reducer) {
|
|
}
|
|
}
|
|
return setValue(state, newSubState);
|
|
return setValue(state, newSubState);
|
|
};
|
|
};
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+var composeReducers = exports.composeReducers = function composeReducers() {
|
|
|
|
+ for (var _len2 = arguments.length, reducers = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
|
|
+ reducers[_key2] = arguments[_key2];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return function (state, action) {
|
|
|
|
+ return reducers.reduce(function (x, r) {
|
|
|
|
+ return r(x, action);
|
|
|
|
+ }, state);
|
|
|
|
+ };
|
|
};
|
|
};
|