Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Run tasks in paralelle, and take the result from either the first (by list-order) task that succeeds, or, if none succeed, the last tasks error.
Run tasks in parallel, and take the result from either the first (by list-order) task that succeeds, or, if none succeed, the last tasks error.
pass an array of tasks that take a callback as their first parameter, and a callback:
function works1(done){
setTimeout(function(){
done(null, 1);
}, 100);
}
function works2(done){
setTimeout(function(){
done(null, 2);
}, 200);
}
asyncOr([works1, works2], function(error, result){
error; // -> null
result; // -> 1
});
Tasks are run in parallel, and the first task in the task list that succeeds will resolve the callback.
eg:
given tasks: [a, b, c]
if a succeeds, it will resolve the callback.
if a fails, and b succeeds, b will resolve the callback.
if a, b, and c fail, the callback will be resolved with c's error.
See the tests for a more in-depth explaination of cases.
FAQs
Run tasks in paralelle, and take the result from either the first (by list-order) task that succeeds, or, if none succeed, the last tasks error.
We found that async-or 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.