expression-error

1.0.0 • Public • Published

Throw Errors

Throws an error as an expression so you can mix it with inline stuff. Similar to an Ecma proposal https://github.com/tc39/proposal-throw-expressions.

To Install

npm i https://github.com/jerrybrown5/expression-error.git

Usage

const error = require('expression-error');
something || error('Something is not true!');
something || error(new Error('Something is not true!'));

Package Sidebar

Install

npm i expression-error

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

4.7 kB

Total Files

11

Last publish

Collaborators

  • jerrybrown5