$ npm install @ungap/promise-all-settled
A cross platform Promise.allSettled polyfill.
import allSettled from '@ungap/promise-all-settled'
const allSettled = require('@ungap/promise-all-settled')
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;
© 2010 - cnpmjs.org x YWFE | Home | YWFE