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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i throwor

      Weekly Downloads

      1

      Version

      1.0.0

      License

      ISC

      Last publish

      Collaborators

      • sssteventsao