Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 2, 2024 via pnpm

signal-exit 3.0.7

when you want to fire an event no matter how a process exits.
Package summary
Share
0
issues
1
license
1
ISC
Package created
16 May 2015
Version published
3 Feb 2022
Maintainers
2
Total deps
1
Direct deps
0
License
ISC

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
signal-exit@3.0.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of signal-exit 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does signal-exit do?

Signal-exit is a JavaScript package that aids in firing an event, regardless of how a process exits. This can include a process reaching the end of execution, explicitly having process.exit(code) called, process.kill(pid, sig) called, or receiving a fatal signal from outside the process. Signal-exit proves to be an advantageous tool when developers wish to capture all possible process exit scenarios within their applications.

How do you use signal-exit?

To use the signal-exit package, you first need to import it into your JavaScript application. There are two ways to do this, either by using the ES6 import syntax or the CommonJS require syntax. After the importation is successfully done, you can then call the onExit function which fires when a process exits.

Here is a simple usage example demonstrating these steps:

// Import signal-exit using ES6 syntax
import { onExit } from 'signal-exit';
// Or you can import using CommonJS syntax
// const { onExit } = require('signal-exit');

onExit((code, signal) => {
  console.log('process exited!', code, signal)
});

The onExit function takes a callback function as its parameter which will be executed when the process exits. The callback function receives the exit code and signal as its arguments.

Where are the signal-exit docs?

The official documentation for signal-exit can be found in the package's README on GitHub at https://github.com/tapjs/signal-exit. Here, you will find a thorough description of the package, how to use it, example code snippets, and other useful explanations and references. For a deep-dive into the package usage and customization options, this is the best place to start.