Skip to content

๐Ÿšช ๐Ÿ›‘ An easy way to hook process.exit().

License

Notifications You must be signed in to change notification settings

Leelow/hook-exit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

hook-exit

Greenkeeper badge npm version NPM downloads Build Status Build Status Codacy Coverage Codacy Grade Dependencies Dev-dependencies JavaScript Style Guide

An easy way to hook process.exit().

Install

$ npm install --save hook-exit

Usage

const exit = require('hook-exit');

exit.hook(function() {  // exit is disable
  console.log('I do not want to exit !');
})

process.exit(); 

exit.unhook();  // exit is enable

process.exit();

Test and coverage

You just have to clone the repo and run

$ npm test
$ npm run coverage

License

MIT ยฉ Lรฉo Lozach

Releases

No releases published

Packages

No packages published