mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
Update ESLint to v3.8.0. * Installed with `npm install --production` to avoid installing unnecessary dev files * Used `dmn -f clean` to further eliminate unneeded files PR-URL: https://github.com/nodejs/node/pull/9112 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
exit-hook 
Run some code when the process exits
The process.on('exit') event doesn't catch all the ways a process can exit.
Useful for cleaning up.
Install
$ npm install --save exit-hook
Usage
var exitHook = require('exit-hook');
exitHook(function () {
console.log('exiting');
});
// you can add multiple hooks, even across files
exitHook(function () {
console.log('exiting 2');
});
throw new Error('unicorns');
//=> exiting
//=> exiting 2
License
MIT © Sindre Sorhus