Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
sequent-promises
Advanced tools
Call promises one by one, ignoring the state (fulfilled or rejected). and returning the collected data in the tuple { results, errors }
.
npm
npm install sequent-promises
yarn
yarn add sequent-promises
import sequentPromises, { isNotRunningError } from 'sequent-promises';
const result = 'result';
const error = new Error('error');
const promiseResolve = () => Promise.resolve(result);
const promiseReject = () => Promise.reject(error);
sequentPromises([promiseResolve, promiseReject, promiseResolve, isSuccessful, isError]).then(
({ success, errors, results }) => {
console.log(success); // [result, result]
console.log(errors); // ['Not running: Promise was not running']
console.log(results); // [result, 'Not running: Promise was not running', result]
console.log(isSuccessful); // true - last promise
console.log(isError); // false - last promise
console.log(isNotRunningError(errors[0])); //true;
},
);
npm test
Krivega Dmitriy
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Copyright © 2020 Krivega Dmitriy.
This project is MIT licensed.
FAQs
sequentPromises resolves Promises sequentially
The npm package sequent-promises receives a total of 1,079 weekly downloads. As such, sequent-promises popularity was classified as popular.
We found that sequent-promises demonstrated a healthy version release cadence and project activity because the last version was released less than 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.