0.0.1 • Published 7 years ago
aborted-promise v0.0.1
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();
0.0.1
7 years ago