Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@zingle/fail

Zingle1MIT0.0.1

utility function to print error and exit

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));