Rocky_Mountain_Vending/.pnpm-store/v10/files/c0/c7960a9e0a7c74ed9ade6bb971b016e02b955df2cbc962bef385ef4da4e915abb3a6f8877710d2644df141f7780bca749e9f7cb044a950af954d74d3acbbdc
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

41 lines
602 B
Text

# WhenExit
Execute a function right before the process, or the browser's tab, is about to exit.
## Install
```sh
npm install when-exit
```
## Usage
```ts
import whenExit from 'when-exit';
// Registering multiple callbacks
onExit ( () => {
console.log ( 'Callback 1' );
});
onExit ( () => {
console.log ( 'Callback 2' );
});
// Registering and disposing a callback
const disposer = onExit ( () => {
console.log ( 'Callback 3' );
});
disposer ();
// Triggering the process to exit
process.exit (); // Callback 1 and 2 are called before exiting
```
## License
MIT © Fabio Spampinato