GitShow/sindresorhus/exit-hook
sindresorhus

exit-hook

Run some code when the process exits

by sindresorhus
Star on GitHubForknpm

JavaScript

302 stars42 forks10 contributorsQuiet · 5mo agoSince 2014v5.1.0MIT

Meet the team

See all 10 on GitHub →
sindresorhus
sindresorhus38 contributions
thecodedrift
thecodedrift4 contributions
Tapppi
Tapppi2 contributions
brandonocasey
brandonocasey1 contribution
dflupu
dflupu1 contribution
BendingBender
BendingBender1 contribution
Julusian
Julusian1 contribution
rpnzl
rpnzl1 contribution

Languages

View on GitHub →
JavaScript97.4%
TypeScript2.6%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
dec0dOS
Node stdout/stderr buffer flushing is still a problem. Wait for console.log to complete before exitClosedIssue

Hello! Thanks for your awesome projects. They provide really good workarounds for current JS ecosystem strange problems. I've faced an issue with flushing the stdout/stderr buffers before the exit. Seems to be that is the root problem. Some hacks like in https://github.com/cowboy/node-exit/blob/master/lib/exit.js is still required in modern node (v20.4.0). My proposal is to integrate the solution in exit-hook, as it's not possible to use these modules together.

dec0dOS · 5mo ago
sergeyzwezdin
Feature request: Ability to use custom loggerClosedIssue

We would like to write all debug messages from to our own Kibana with some field predefined. Currently, uses to write any logs. Could you please introduce ability to intercept log messages or override the logger at all?

sergeyzwezdin · 5mo ago
theoephraim
exit code passed to `gracefulExit()` not workingClosedIssue

After updating to 5.0.0, it seems exit codes are not being passed through anymore. Downgrading to v4 fixed the issue for me. https://stackblitz.com/edit/stackblitz-starters-xwbihfsk

theoephraim · 7mo ago
Structured data for AI agents

Repository: sindresorhus/exit-hook. Description: Run some code when the process exits Stars: 302, Forks: 42. Primary language: JavaScript. Languages: JavaScript (97.4%), TypeScript (2.6%). License: MIT. Latest release: v5.1.0 (5mo ago). Open PRs: 0, open issues: 0. Last activity: 5mo ago. Community health: 85%. Top contributors: sindresorhus, thecodedrift, Tapppi, brandonocasey, dflupu, BendingBender, Julusian, rpnzl, Richienb, SCG82.

·@ofershap

Replace github.com with gitshow.dev