async-exit-hook
async-exit-hook copied to clipboard
Misleading readme example
callback is always called https://github.com/Tapppi/async-exit-hook/blame/80e692c88e62a88cf5750460ff02c28298e5b09b/readme.md#L60
callback is not always provided https://github.com/Tapppi/async-exit-hook/blob/80e692c88e62a88cf5750460ff02c28298e5b09b/index.js#L39
should be
exitHook(callback => {
setTimeout(() => {
console.log('exiting 3');
if(callback) callback();
}, 1000);
});
So the source code says it can't call async callbacks on exit. Is this correct? I'm kind'a facing this issue right now and not sure if it's supported or not.