river-of-ebooks/assets/js/lib/Util.js

12 lines
301 B
JavaScript
Raw Normal View History

export default class Util {
static combineReducers (...reducers) {
return function (...reducerParams) {
for (const reduce of reducers) {
const changes = reduce(...reducerParams)
if (changes && Object.keys(changes).length) return changes
}
return {}
}
}
}