All Projects → es-shims → Promise.allSettled

es-shims / Promise.allSettled

Licence: MIT license
ES Proposal spec-compliant shim for Promise.allSettled

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Promise.allSettled

Core Js
Standard Library
Stars: ✭ 15,854 (+16947.31%)
Mutual labels:  polyfill, promise, shim
Ts Polyfill
Runtime polyfills for TypeScript libs, powered by core-js! 🔋 🔩
Stars: ✭ 122 (+31.18%)
Mutual labels:  polyfill, promise
Object.getOwnPropertyDescriptors
Spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.
Stars: ✭ 19 (-79.57%)
Mutual labels:  polyfill, shim
alls
Just another library with the sole purpose of waiting till all promises to complete. Nothing more, Nothing less.
Stars: ✭ 13 (-86.02%)
Mutual labels:  promise, allsettled
best-queue
Queue in runtime based promise
Stars: ✭ 26 (-72.04%)
Mutual labels:  promise, await
Fetch
A window.fetch JavaScript polyfill.
Stars: ✭ 25,118 (+26908.6%)
Mutual labels:  polyfill, promise
Tickedoff
Tiny library (<200B gzip) for deferring something by a "tick"
Stars: ✭ 213 (+129.03%)
Mutual labels:  polyfill, promise
object-keys
Object.keys shim
Stars: ✭ 41 (-55.91%)
Mutual labels:  polyfill, shim
try-to-catch
functional try-catch wrapper for promises
Stars: ✭ 30 (-67.74%)
Mutual labels:  promise, await
relaks
Asynchrounous React component
Stars: ✭ 49 (-47.31%)
Mutual labels:  promise, await
WebsocketPromisify
Makes websocket's API just like REST with Promise-like API, with native Promises.
Stars: ✭ 18 (-80.65%)
Mutual labels:  promise, await
Promise Fun
Promise packages, patterns, chat, and tutorials
Stars: ✭ 3,779 (+3963.44%)
Mutual labels:  polyfill, promise
String.prototype.matchAll
Spec-compliant polyfill for String.prototype.matchAll, in ES2020
Stars: ✭ 14 (-84.95%)
Mutual labels:  polyfill, shim
Es6 Promise Polyfill
ES6 Promise polyfill
Stars: ✭ 99 (+6.45%)
Mutual labels:  polyfill, promise
Array.prototype.at
An ES-spec-compliant (proposed) `Array.prototype.at`shim/polyfill/replacement that works as far down as ES3.
Stars: ✭ 20 (-78.49%)
Mutual labels:  polyfill, shim
array-includes
Array.prototype.includes spec-compliant polyfill
Stars: ✭ 42 (-54.84%)
Mutual labels:  polyfill, shim
parcel-plugin-goodie-bag
provides the Promise and fetch goodies needed for IE(11) support w/ parcel bundle loading
Stars: ✭ 15 (-83.87%)
Mutual labels:  polyfill, promise
webpack2-polyfill-plugin
Insert polyfills (such as Promise) for Webpack 2
Stars: ✭ 18 (-80.65%)
Mutual labels:  polyfill, promise
barcode-detector
Spec compliant polyfill of the Barcode Detection API 🤳
Stars: ✭ 31 (-66.67%)
Mutual labels:  polyfill, shim
do
Simplest way to manage asynchronicity
Stars: ✭ 33 (-64.52%)
Mutual labels:  promise, await

promise.allsettled Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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 }
	]);
});

Tests

Simply clone the repo, npm install, and run npm test

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].