Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 328 Bytes

README.md

File metadata and controls

13 lines (9 loc) · 328 Bytes

@ungap/with-resolvers

A Promise.withResolvers() polyfill.

import '@ungap/with-resolvers';
// require('@ungap/with-resolvers');

const {resolve, reject, promise} = Promise.withResolvers();

promise.then(console.log, console.error);
resolve(Math.random());