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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2

Package Sidebar

Install

npm i throwor

Weekly Downloads

2

Version

1.0.0

License

ISC

Last publish

Collaborators

  • sssteventsao