package
Promise.witResolvers() polyfill
npm install @ungap/with-resolversGitHub-flavored package documentation.
Across all versions, last 30 days.
544,747 in 30 days
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
1.4 kB
Includes dependencies.
A Promise.witResolvers() polyfill.
import '@ungap/with-resolvers';
// require('@ungap/with-resolvers');
const {resolve, reject, promise} = Promise.withResolvers();
promise.then(console.log, console.error);
resolve(Math.random());