
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@zuze/modifiable-effects
Advanced tools
Simple side-effects implementation for a modifiable.
Given a modifiable, an effect is just a plain modifier that returns the identity function, so you can do this:
import { effect } from '@zuze/modiable-effects',
import { modifiable } from '@zuze/modifiable';
const myEffect1 = async (context,setContext,getState) => { ... }
const myEffect2 = async (context,setContext,getState) => { ... }
const m = modifiable(initialState,{
modifiers:[
effect(myEffect1),
[ effect(myEffect2), 'dep1', 'dep2', ({dep3}) => dep3[0] ],
...otherModifiers
]
});
Or you can use the default export function that accepts a
import withEffects from '@zuze/modifiable-effects';
import { modifiable } from '@zuze/modifiable';
const m = modifiable(...);
const myEffect = async => (context,setContext,getState) => {
try {
await someAsyncCall();
setContext({...})
} catch(err) {
setContext({...})
}
};
const myEffect2 = async => ...
const removeEffect = withEffects(modifiable, myEffect, myEffect2, ...otherEffects);
// returns a function that accepts a function reference and removes a side effect
removeEffect(myEffect);
import withEffects from '@zuze/modifiable-effects';
import { modifiable } from '@zuze/modifiable';
const m = modifiable(...);
const myEffect = [async (context,setContext,getState) => {
try {
await someAsyncCall();
setContext({...})
} catch(err) {
setContext({...})
}
// this effect will run only when context changes
}, ['dep1', 'dep2', ({dep3}) => dep3[0] ]
withEffects(modifiable,myEffect);
FAQs
Simple side effects helper for @zuze/modifiable
We found that @zuze/modifiable-effects 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.