@alwatr/exit-hook
TypeScript icon, indicating that this package has built-in type declarations

5.5.3 • Public • Published

Exit Hook

A utility for registering exit handlers in Node.js.

Installation

yarn add @alwatr/exit-hook

Usage

import {exitHook} from '@alwatr/exit-hook';

const saveAllData = () => {
  // save all data
};

exitHook(saveAllData);

Sponsors

The following companies, organizations, and individuals support Nanolib ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.

Contributing

Contributions are welcome! Please read our contribution guidelines before submitting a pull request.

License

This project is licensed under the AGPL-3.0 License.

Package Sidebar

Install

npm i @alwatr/exit-hook

Weekly Downloads

61

Version

5.5.3

License

AGPL-3.0-only

Unpacked Size

64.7 kB

Total Files

10

Last publish

Collaborators

  • alimd