@zingle/fail
v0.0.1
Published
utility function to print error and exit
Downloads
2
Keywords
Readme
Use the fail
function to print an error and exit.
Usage
const http = require("http");
const fail = require("@zingle/fail");
// exits with 100 exit status on timeout
http
.request("http://www.example.com/foo")
.on("timeout", () => fail(new Error("took too long"), 100));