README.md
1.09 KB
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;