sysexits

1.0.1 • Public • Published

sysexits

Provide sysexits(3) exit codes in Node.js.

Why?

It avoids having arbitrary exit codes and get them consistent with UNIX tools. For instance, an invalid CLI usage should return 64.

Install

npm install sysexits

Example

var Exit = require('sysexits');
 
if (process.args.length < 3) {
    console.log 'error:', Exit.desc[Exit.USAGE]
    process.exit(Exit.USAGE);
}
 
/* etc. */

See sysexits.js for the complete list of codes.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    67

Package Sidebar

Install

npm i sysexits

Weekly Downloads

68

Version

1.0.1

License

none

Last publish

Collaborators

  • undashes