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.3 - 2021-01-20
a066121
auto-changelog
7b27067
aae74fd
nyc
on all tests; use tape
runner; add implementation tests fbd8198
array.prototype.map
, es-abstract
; add call-bind
424f760
eslint
, @ljharb/eslint-config
, aud
, call-bind
, functions-have-names
, tape
47c5df1
d931b6c
callBind
instead of function-bind
directly 09c25e8
eslint
, @ljharb/eslint-config
, functions-have-names
, tape
; add aud
03aedb0
array.prototype.map
, es-abstract
, iterate-value
f28e1aa
5feffee
pull_request_target
event b30a268
aud
on prod deps bf97e5f
es-abstract
6a6ae55
iterate-value
13507f3
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.