@ungap/promise-all-settled
v1.1.2
Published
A cross platform Promise.allSettled polyfill
Downloads
8,598,207
Maintainers
Readme
Promise.allSettled
A cross platform Promise.allSettled polyfill.
- CDN global utility via https://unpkg.com/@ungap/promise-all-settled
- ESM via
import allSettled from '@ungap/promise-all-settled'
- CJS via
const allSettled = require('@ungap/promise-all-settled')
Example
const allSettled = require("@ungap/promise-all-settled");
// use it via call
allSettled.call(Promise, []);
// or bind it:
const $settled = allSettled.bind(Promise);
// or put it in the Promise class
if (!Promise.allSettled)
Promise.allSettled = allSettled;