@ryaninvents/make-abortable
v0.0.0
Published
Turn any promise into an abortable promise
Downloads
3
Readme
@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();