Run some code when the process exits
☆302Feb 4, 2026Updated last month
Alternatives and similar repositories for exit-hook
Users that are interested in exit-hook are comparing it to the libraries listed below
Sorting:
- Node's default require extensions as a separate module☆11Oct 27, 2022Updated 3 years ago
- Create an array with values that are present in the first input array but not additional ones☆40Sep 14, 2021Updated 4 years ago
- Check if a path is in the current working directory☆23May 3, 2021Updated 4 years ago
- Gracefully restore the CLI cursor on exit☆41Jul 26, 2024Updated last year
- Check if a path is the current working directory☆22May 10, 2025Updated 9 months ago
- Modify the filename in a path☆17Jul 9, 2022Updated 3 years ago
- Truncate a semver version: 1.2.3 → 1.2.0☆18Jul 9, 2022Updated 3 years ago
- Check if your code is running as an npm or yarn script☆66Sep 10, 2025Updated 5 months ago
- Convert matching single-quotes to double-quotes: `I 'love' unicorns` → `I "love" unicorns`☆24Jul 9, 2022Updated 3 years ago
- ES2015 Number.isFinite() ponyfill☆20Apr 7, 2021Updated 4 years ago
- Modify the values of an object☆29Sep 10, 2021Updated 4 years ago
- Get the version of a binary in semver format☆42Apr 3, 2024Updated last year
- Lowercase the keys of an object☆41Feb 2, 2026Updated last month
- Detect whether the terminal supports Unicode☆88Sep 9, 2024Updated last year
- Ensures a value is a valid error by making it one if not☆88Sep 15, 2025Updated 5 months ago
- Toggle the CLI cursor☆113Jul 26, 2024Updated last year
- Check if a path is a file, directory, or symlink☆80Feb 2, 2026Updated last month
- Check if a number is a redirect HTTP status code☆25Apr 17, 2021Updated 4 years ago
- Get the arguments of a function, arrow function, generator function, async function☆54Oct 30, 2023Updated 2 years ago
- Get the name and version of a macOS release from the Darwin version☆67Jun 11, 2025Updated 8 months ago
- Get the first path that exists on disk of multiple paths☆63Sep 15, 2025Updated 5 months ago
- Import a module like with `require()` but from a given path☆86Jul 8, 2022Updated 3 years ago
- Ensure a function is only called once☆165Feb 2, 2026Updated last month
- Truncate a string to a specific width in the terminal☆88Updated this week
- Convert a tilde path to an absolute path: ~/dev => /Users/sindresorhus/dev☆148Sep 9, 2025Updated 5 months ago
- Find semver versions in a string: `unicorn v1.2.3` → `1.2.3`☆46Apr 3, 2024Updated last year
- Sort the keys of an object☆108Aug 24, 2025Updated 6 months ago
- Get the real path of the system temp directory☆85Sep 26, 2022Updated 3 years ago
- Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}☆37Feb 26, 2022Updated 4 years ago
- Clean up error stack traces☆346Nov 4, 2025Updated 4 months ago
- Get the directory of globally installed packages and binaries☆77Feb 2, 2026Updated last month
- Get the bundle identifier of the default browser (macOS). Example: com.apple.Safari☆13Nov 14, 2025Updated 3 months ago
- Strip a path from a path☆18Aug 18, 2021Updated 4 years ago
- Reverse minimist. Convert an object of options into an array of command-line arguments☆187Feb 19, 2023Updated 3 years ago
- Check if a value is a regular expression☆26Oct 31, 2021Updated 4 years ago
- Map of nouns to their irregular plural form☆91Nov 2, 2025Updated 4 months ago
- Split lines into an array of lines☆46Oct 30, 2023Updated 2 years ago
- A safer `.hasOwnProperty()`☆29Jun 21, 2023Updated 2 years ago
- Exit the process when the `esc` key is pressed☆58Dec 4, 2023Updated 2 years ago