Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var subReducer = fn(obj);
// there are two forms of return the subreducer can have
// straight stream form
// or object form where we need to scan it into string
if (subReducer.source && subReducer.reducer) {
// object form
subReducer = scan(subReducer.source, subReducer.reducer || function (_, n) {
return n;
}, _this.initialState[k]);
}
return subReducer.map(function (x) {
return _defineProperty({}, k, x);
}); // map to its particular namespace
});
var source = merge.apply(undefined, _toConsumableArray(sources));
var reducer = function reducer(acc, n) {
return _extends({}, acc, n);
};
return { source: source, reducer: reducer };
}
}]);