
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@micro-js/combine-reducers
Advanced tools
Combines an object of reducers together to form a single, composite reducer. This function is identical to the one provided by https://github.com/rackt/redux but it doesn't do the sanity checks that redux does, which allows you to do a few things like having multiple root reducers combined into one that you can't do with redux's assertions.
$ npm install @micro-js/combine-reducers
var combineReducers = require('@micro-js/combine-reducers')
combineReducers({
counter1: counterReducer,
counter2: counterReducer
})
function counterReducer (state, action) {
if (action.type === INCREMENT) {
return ++state
}
return state
}
reducers
- An object containing a map of reducers to property namesReturns: The combined reducer map as a single reducing function.
MIT
FAQs
Combines an object of reducers
We found that @micro-js/combine-reducers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.