@ryaninvents/make-abortable
Wrap any Promise to allow you to abort it later.
Installation
npm i --save @ryaninvents/make-abortable
Usage
const promise = makeAbortable(someOtherPromise);
// then, if you need to cancel...
promise.controller.abort();
Wrap any Promise to allow you to abort it later.
npm i --save @ryaninvents/make-abortable
const promise = makeAbortable(someOtherPromise);
// then, if you need to cancel...
promise.controller.abort();
npm i @ryaninvents/make-abortable
0
0.0.0
MIT
4.11 kB
4