
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@sepo27/redux-di
Advanced tools
A function combineDiReducers()
handles depedency injection into reducers in tree.
combineDiReducers()
accepts reducer tree:
const reducerTree = {
foo: makePlainReducer('initial foo', (state, action) => (
action.type === 'UPDATE_ACTION' ? 'foo updated' : state
)),
bar: makeDiReducer(
'initial foo',
{foo: '@foo', fox: '@baz.fox'},
(state, action, {foo, fox}, changes: ExReducerDependenciesChanges) => {
if (changes.for('foo')) return foo;
else if (changes.for('fox')) return fox;
return state;
}
),
baz: {
fox: makeDiReducer(
'initial state',
{foo: '@foo'},
(state, action, {foo}, changes: ExReducerDependenciesChanges) => {
return changes.yes() ? foo : state;
}
)
}
};
const rootReducer = combineDiReducers(reducerTree);
makePlainReducer()
: returns reducer which handles initial statemakeDiReducer
: returns reducer which handles initial state and has dependency specification storedcombineDiReducers()
: returns a root reducer, which will traverse reducers tree and handle depedency injection.Key features:
@some.path
: absolute path from any place in tree to root state^sibling.path
: path to sibling branch^^parentSibling.path
: path to parent's sibling branchLimitations:
npm version
npm publish
FAQs
Redux reducers with dependency injection
The npm package @sepo27/redux-di receives a total of 348 weekly downloads. As such, @sepo27/redux-di popularity was classified as not popular.
We found that @sepo27/redux-di 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.