node/tools/eslint/node_modules/bail/readme.md
Rich Trott c5adb5f008
tools: update ESLint to 4.2.0
ESLint 4.2.0 contains a fix for a bug that is blocking us from moving to
the non-legacy stricter indentation linting. Update to 4.2.0 to remove
the blocking issue.

Backport-PR-URL: https://github.com/nodejs/node/pull/14859
PR-URL: https://github.com/nodejs/node/pull/14155
Ref: https://github.com/eslint/eslint/issues/8882
Ref: https://github.com/eslint/eslint/pull/8885
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-05 12:49:53 -04:00

71 lines
1.1 KiB
Markdown

# bail [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
:warning: Throw a given error.
## Installation
[npm][npm-install]:
```bash
npm install bail
```
## Usage
```js
var bail = require('bail');
bail();
bail(new Error('failure'));
// Error: failure
// at repl:1:6
// at REPLServer.defaultEval (repl.js:154:27)
// ...
```
## API
### `bail([err])`
Throw a given error.
###### Parameters
* `err` (`Error?`) — Optional error.
###### Throws
* `Error` — Given error, if any.
## Related
* [`noop`][noop]
* [`noop2`][noop2]
* [`noop3`][noop3]
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[travis-badge]: https://img.shields.io/travis/wooorm/bail.svg
[travis]: https://travis-ci.org/wooorm/bail
[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/bail.svg
[codecov]: https://codecov.io/github/wooorm/bail
[npm-install]: https://docs.npmjs.com/cli/install
[license]: LICENSE
[author]: http://wooorm.com
[noop]: https://www.npmjs.com/package/noop
[noop2]: https://www.npmjs.com/package/noop2
[noop3]: https://www.npmjs.com/package/noop3