{"id":20375060,"url":"https://github.com/leelow/hook-exit","last_synced_at":"2026-05-17T03:35:14.992Z","repository":{"id":57266516,"uuid":"86832519","full_name":"Leelow/hook-exit","owner":"Leelow","description":"🚪 🛑 An easy way to hook process.exit().","archived":false,"fork":false,"pushed_at":"2019-02-25T19:40:27.000Z","size":198,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T13:18:21.471Z","etag":null,"topics":["exit","handler","hook","javascript","js","mock","nodejs","quit","stop"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Leelow.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-31T15:13:50.000Z","updated_at":"2017-04-01T08:43:49.000Z","dependencies_parsed_at":"2022-08-25T03:41:09.116Z","dependency_job_id":null,"html_url":"https://github.com/Leelow/hook-exit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leelow%2Fhook-exit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leelow%2Fhook-exit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leelow%2Fhook-exit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leelow%2Fhook-exit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leelow","download_url":"https://codeload.github.com/Leelow/hook-exit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241923880,"owners_count":20043096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exit","handler","hook","javascript","js","mock","nodejs","quit","stop"],"created_at":"2024-11-15T01:28:39.257Z","updated_at":"2026-05-17T03:35:14.941Z","avatar_url":"https://github.com/Leelow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hook-exit\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/Leelow/hook-exit.svg)](https://greenkeeper.io/)\n[![npm version][npm-version-image]][npm-version-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n[![Build Status][appveyor-image]][appveyor-url]\n[![Codacy Coverage][codacy-coverage-image]][codacy-coverage-url]\n[![Codacy Grade][codacy-grade-image]][codacy-grade-url]\n[![Dependencies][dependencies-image]][dependencies-url]\n[![Dev-dependencies][dev-dependencies-image]][dev-dependencies-url]\n[![JavaScript Style Guide][javascript-standard-image]][javascript-standard-url]\n\nAn easy way to hook process.exit().\n\n## Install\n\n```\n$ npm install --save hook-exit\n```\n\n## Usage\n\n```js\nconst exit = require('hook-exit');\n\nexit.hook(function() {  // exit is disable\n  console.log('I do not want to exit !');\n})\n\nprocess.exit(); \n\nexit.unhook();  // exit is enable\n\nprocess.exit();\n\n```\n\n## Test and coverage\nYou just have to clone the repo and run\n\n```\n$ npm test\n$ npm run coverage\n```\n\n## License\n\n[MIT](LICENSE) © [Léo Lozach](https://github.com/Leelow)\n\n[npm-version-image]: https://badge.fury.io/js/hook-exit.svg\n[npm-version-url]: https://www.npmjs.com/package/hook-exit\n[downloads-image]: https://img.shields.io/npm/dt/hook-exit.svg?maxAge=3600\n[downloads-url]: https://www.npmjs.com/package/hook-exit\n[travis-image]: https://travis-ci.org/Leelow/hook-exit.svg?branch=master\n[travis-url]: https://travis-ci.org/Leelow/hook-exit\n[appveyor-image]: https://ci.appveyor.com/api/projects/status/32aj3ap0kelnbdqt?svg=true\n[appveyor-url]: https://ci.appveyor.com/project/Leelow/hook-exit\n[codacy-coverage-image]: https://api.codacy.com/project/badge/Coverage/be1d56eb162d41a586ecac79685161f7\n[codacy-coverage-url]: https://www.codacy.com/app/Leelow/hook-exit?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=Leelow/hook-exit\u0026utm_campaign=Badge_Coverage\n[codacy-grade-image]: https://api.codacy.com/project/badge/Grade/be1d56eb162d41a586ecac79685161f7\n[codacy-grade-url]: https://www.codacy.com/app/Leelow/hook-exit?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Leelow/hook-exit\u0026amp;utm_campaign=Badge_Grade\n[dependencies-image]: https://david-dm.org/leelow/hook-exit/status.svg\n[dependencies-url]: https://david-dm.org/leelow/hook-exit?type=dev\n[dev-dependencies-image]: https://david-dm.org/leelow/hook-exit/dev-status.svg\n[dev-dependencies-url]: https://david-dm.org/leelow/hook-exit?type=dev\n[javascript-standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n[javascript-standard-url]: http://standardjs.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleelow%2Fhook-exit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleelow%2Fhook-exit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleelow%2Fhook-exit/lists"}