{"name":"bail","version":"2.0.1","description":"Throw a given error","license":"MIT","keywords":["fail","bail","throw","callback","error"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bail.git"},"bugs":{"url":"https://github.com/wooorm/bail/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.38.0"},"scripts":{"prepack":"npm run build && npm run format","build":"rimraf \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"import/no-mutable-exports":"off","no-var":"off","prefer-arrow-callback":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"53f0ef53a83814a634b97df024401a6bcf83ec01","homepage":"https://github.com/wooorm/bail#readme","_id":"bail@2.0.1","_nodeVersion":"15.11.0","_npmVersion":"7.6.2","dist":{"integrity":"sha512-d5FoTAr2S5DSUPKl85WNm2yUwsINN8eidIdIwsOge2t33DaOfOdSmmsI11jMN3GmALCXaw+Y6HMVHDzePshFAA==","shasum":"d676736373a374058a935aec81b94c12ba815771","tarball":"http://registry-npm.ywwl.com/bail/download/bail-2.0.1.tgz","fileCount":5,"unpackedSize":4876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXaPqCRA9TVsSAnZWagAANnAP/2P5VA0iZe1BBYsod4Ip\nV2KZESEaNWAUStOHpf+e6RGrqYzRTLWL6ggF0ru7LBkO5S43roT5LO+Yewya\ntfvhgdipGBvpxiVKViKDgoY5ZkFNyu6H2jIzl+FwT5654cj3VrxxlAFtnD3J\nieyhjcS/N700rvyy3HrU84hXcxcABLqSj6IsHD74XT4SYidDK7RlSbpdyedP\nQMMpzjjI/fnVi9mUAXTCWZzzo4QKu1gZAk5R5uJX8+QsIWSrnskg+bpj4H17\nnl+zwYKoqnIV3QMXD0+jjE3rqY4s0oUw+PyDizQUyNaorML8NFBVxvjfsWhW\nUbGUwQjv4eZVeTvgef8ylBaNygeKf+29Hd+WX5ReobL7ENEEJfZ1QfZcY0Ld\nNyj61T7Ape78MIWodxjYxnQyDLKaoI+quLYyMfzP0OviQ/XZOe26eTZ21ISX\nESu/vX0X882FloeDIh/HHEW7xYnJ0MrRuArCG4LwD66VFiAkC4iv7VHTBrBG\nKBCQU+VhYvxhp/Sy7/fga9rGbgR7VGJgf/o6r6xJke1JykXsr/cck+ADxXvx\nTw7ayK5bJvKizdAwvksYwKMsO/zmthnY4xx8Oa9pVBr6EONdWh68vUwpneXX\nRG7+HgzpsQKq3rFVB6qw3B4NJn8WR9bEpHWl21FhuSMo6uJhlwzGpgJjJvE+\nuC+l\r\n=2T8q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCisIng+ncnXxYft1r+RIsiSme5nNUhlixPF0BTVlloPQIhALHLMEUwuuO72M9Jyryr9NQdGairKDwIqrSbKjEmBvHa"}],"size":2368,"noattachment":false,"key":"/bail/-/bail-2.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bail_2.0.1_1616749546309_0.859336192497441"},"_hasShrinkwrap":false,"readme":"# bail\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nThrow if given an error.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`bail(err?)`](#bailerr)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package throws a given error.\n\n## When should I use this?\n\nUse this package if you’re building some scripts that might theoretically get\nerrors but frequently don’t and you keep writing `if (error) throw error` over\nand over again and you’re just really done with that.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:\n\n```sh\nnpm install bail\n```\n\nIn Deno with [Skypack][]:\n\n```js\nimport {bail} from 'https://cdn.skypack.dev/bail@2?dts'\n```\n\nIn browsers with [Skypack][]:\n\n```html\n<script type=\"module\">\n  import {bail} from 'https://cdn.skypack.dev/bail@2?min'\n</script>\n```\n\n## Use\n\n```js\nimport {bail} from 'bail'\n\nbail()\n\nbail(new Error('failure'))\n// Error: failure\n//     at repl:1:6\n//     at REPLServer.defaultEval (repl.js:154:27)\n//     …\n```\n\n## API\n\nThis package exports the following identifier: `bail`.\nThere is no default export.\n\n### `bail(err?)`\n\nThrow a given error (`Error?`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nThere are no extra exported types.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 12.20+, 14.14+, and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Security\n\nThis package is safe.\n\n## Related\n\n*   [`noop`][noop]\n*   [`noop2`][noop2]\n*   [`noop3`][noop3]\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/wooorm/bail/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/bail/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/bail.svg\n\n[coverage]: https://codecov.io/github/wooorm/bail\n\n[downloads-badge]: https://img.shields.io/npm/dm/bail.svg\n\n[downloads]: https://www.npmjs.com/package/bail\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/bail.svg\n\n[size]: https://bundlephobia.com/result?p=bail\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[skypack]: https://www.skypack.dev\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[noop]: https://www.npmjs.com/package/noop\n\n[noop2]: https://www.npmjs.com/package/noop2\n\n[noop3]: https://www.npmjs.com/package/noop3\n","publish_time":1616749546506,"_cnpm_publish_time":1616749546506,"dist-tags":{"latest":"2.0.2"}}