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 = ; if processargslength < 3 consolelog 'error:' ExitdescExitUSAGE process; /* etc. */
See sysexits.js
for the complete list of codes.