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.
promise.allsettled
Advanced tools
ES Proposal spec-compliant shim for Promise.allSettled. Invoke its "shim" method to shim Promise.allSettled
if it is unavailable or noncompliant. Note: a global Promise
must already exist: the es6-shim is recommended.
This package implements the es-shim API interface. It works in an ES3-supported environment that has Promise
available globally, and complies with the proposed spec.
Most common usage:
var assert = require('assert');
var allSettled = require('promise.allsettled');
var resolved = Promise.resolve(42);
var rejected = Promise.reject(-1);
allSettled([resolved, rejected]).then(function (results) {
assert.deepEqual(results, [
{ status: 'fulfilled', value: 42 },
{ status: 'rejected', reason: -1 }
]);
});
allSettled.shim(); // will be a no-op if not needed
Promise.allSettled([resolved, rejected]).then(function (results) {
assert.deepEqual(results, [
{ status: 'fulfilled', value: 42 },
{ status: 'rejected', reason: -1 }
]);
});
Simply clone the repo, npm install
, and run npm test
v1.0.0 - 2019-03-27
travis-ci
0201190
1a519d1
562952d
cee4c56
60f133f
6b9cc53
Array.from
; fix tests 53ff455
npm run lint
d61e9f7
cb2ea36
npx aud
for posttest, and safe-publish-latest
for prepublish 68995cd
FAQs
ES Proposal spec-compliant shim for Promise.allSettled
The npm package promise.allsettled receives a total of 1,021,301 weekly downloads. As such, promise.allsettled popularity was classified as popular.
We found that promise.allsettled 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.