Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 17, 2024 via pnpm

exit 0.1.2

A replacement for process.exit that ensures stdio are fully drained before exiting.
Package summary
Share
0
issues
1
license
1
MIT
Package created
20 Sep 2013
Version published
26 Nov 2013
Maintainers
1
Total deps
1
Direct deps
0
License
UNKNOWN

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
exit@0.1.2
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 exit 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does exit do?

The "exit" is a valuable npm package, acting as a replacement for process.exit, but with an added advantage. It ensures that standard input/output (stdio) are fully drained before the process exits. This feature addresses a common issue encountered on Windows, where script output tends to be truncated when stdout or stderr is redirected and process.exit is called. The "exit" package circumvents this problem by waiting until the associated streams have been entirely drained before actually invoking process.exit. It offers a reliable solution to the truncation problem, providing complete and accurate script output.

How do you use exit?

The usage of the "exit" package is quite straightforward. You need to first install the package with npm install exit. Following successful installation, in your Javascript file, start by requiring the exit package with var exit = require('exit');. The package replaces instances of process.exit(). For instance, when you want to exit a process with a status code of 5, you would write exit(5); instead of process.exit(5);. Here's a full example:

var exit = require('exit');

// These lines should appear in the output, EVEN ON WINDOWS.
console.log("foo");
console.error("bar");

// process.exit(5);
exit(5);

// These lines shouldn't appear in the output.
console.log("foo");
console.error("bar");

Where are the exit docs?

The readme file of the exit npm package serves as its primary documentation. It provides details on what the package does, how to install it, and how to incorporate it into your JavaScript code. For more insights and details, consider referring to Node.js issue #3584 or the GitHub page of the package, which is hosted at "git://github.com/cowboy/node-exit.git".

All Versions