.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / bail / readme.md
1 # bail
2
3 [![Build][build-badge]][build]
4 [![Coverage][coverage-badge]][coverage]
5 [![Downloads][downloads-badge]][downloads]
6 [![Size][size-badge]][size]
7
8 :warning: Throw a given error.
9
10 ## Install
11
12 [npm][]:
13
14 ```sh
15 npm install bail
16 ```
17
18 ## Use
19
20 ```js
21 var bail = require('bail')
22
23 bail()
24
25 bail(new Error('failure'))
26 // Error: failure
27 //     at repl:1:6
28 //     at REPLServer.defaultEval (repl.js:154:27)
29 //     …
30 ```
31
32 ## API
33
34 ### `bail([err])`
35
36 Throw a given error.
37
38 ###### Parameters
39
40 *   `err` (`Error?`) — Optional error.
41
42 ###### Throws
43
44 *   `Error` — Given error, if any.
45
46 ## Related
47
48 *   [`noop`][noop]
49 *   [`noop2`][noop2]
50 *   [`noop3`][noop3]
51
52 ## License
53
54 [MIT][license] © [Titus Wormer][author]
55
56 <!-- Definitions -->
57
58 [build-badge]: https://img.shields.io/travis/wooorm/bail.svg
59
60 [build]: https://travis-ci.org/wooorm/bail
61
62 [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/bail.svg
63
64 [coverage]: https://codecov.io/github/wooorm/bail
65
66 [downloads-badge]: https://img.shields.io/npm/dm/bail.svg
67
68 [downloads]: https://www.npmjs.com/package/bail
69
70 [size-badge]: https://img.shields.io/bundlephobia/minzip/bail.svg
71
72 [size]: https://bundlephobia.com/result?p=bail
73
74 [npm]: https://docs.npmjs.com/cli/install
75
76 [license]: license
77
78 [author]: https://wooorm.com
79
80 [noop]: https://www.npmjs.com/package/noop
81
82 [noop2]: https://www.npmjs.com/package/noop2
83
84 [noop3]: https://www.npmjs.com/package/noop3