aborted-promise

v0.0.1
Cancelable promise
cancel abort promise

CancelablePromise

ONLY JAVASRIPT ENGINES WITH INHERITANCE SUPPORT FOR NATIVE OBJECTS!

const CancelablePromise = require('aborted-promise');

const promise = CancelablePromise.all([
    new Promise((resolve, reject) => resolve())
]);

new CancelablePromise((resolve, reject) => resolve())
    .then(() => console.log('without cancel'));

promise
    .then(() => console.log('with cancel'))
    .cancel();

Say "Thank you, developer!"

npm i aborted-promise

Metadata

  • MIT
  • Whatever
  • Igor Katsuba
  • released 10/11/2017

Downloads

Maintainers