throwor

1.0.0 • Public • Published

Utility async handler

  fs.readFile(
    "testData.txt",
    "utf8",
    throwOr(/* err, */data => {
      // Usually you need to write:
      // if (err) throw err;
      console.log(data)
    }),
  );

/throwor/

    Package Sidebar

    Install

    npm i throwor

    Weekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Last publish

    Collaborators

    • sssteventsao