Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
lil-saga
is a small library to assist in use of the saga pattern.
lil-saga
accepts a generator which may yield a Saga
, a Promise
, or an array containing a mix of Saga
s and Promise
s.
If an array is yielded, the actions (and any subsequent rollbacks), will be performed concurrently.
If an error occurs during execution, any previously executed Saga
s will have their undo
performed, in reverse order of execution.
import lilSaga from 'lil-saga';
await lilSaga(function*() {
let promiseYieldingFunctionResult = yield promiseYieldingFunction();
let anotherPromiseYieldingFunctionResult = yield {
do() {
return anotherPromiseYieldingFunction();
},
undo() {
return anotherPromiseYieldingFunctionReverse();
}
};
let [
thing1,
thing2,
thing3
] = yield [
doThing1(),
{
do: () => doThing2(),
undo: () => undoThing2()
},
doThing3()
];
});
FAQs
A small saga implementation
The npm package lil-saga receives a total of 0 weekly downloads. As such, lil-saga popularity was classified as not popular.
We found that lil-saga 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.