0.0.1 • Published 7 years ago

aborted-promise v0.0.1

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

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!"