npdefer
v1.0.5
Published
Most straight-forward and simple implementation of 'Deferred Object' concept based on native promises
Downloads
750
Readme
Most straight-forward and simple implementation of 'Deferred Object' concept based on native promises
install
npm install --save npdefer
usage
import Deferred from 'npdefer';
const processExit = new Deferred();
process.on('close', () => {
processExit.resolve("bye");
});
processExit.promise.then(message => {
console.log(message);
})