🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

sysexits

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sysexits

Provide standard sysexits(3) exit codes.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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.

Keywords

code

FAQs

Package last updated on 23 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts