2026-03-04 12:59:40 +01:00

13 lines
326 B
Markdown

# @ungap/with-resolvers
A [Promise.witResolvers()](https://github.com/tc39/proposal-promise-with-resolvers) polyfill.
```js
import '@ungap/with-resolvers';
// require('@ungap/with-resolvers');
const {resolve, reject, promise} = Promise.withResolvers();
promise.then(console.log, console.error);
resolve(Math.random());
```