{"name":"bail","version":"1.0.4","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"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^14.0.0","prettier":"^1.12.0","remark-cli":"^6.0.0","remark-preset-wooorm":"^4.0.0","tape":"^4.0.0","tinyify":"^2.5.0","xo":"^0.24.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify index.js -s bail -o bail.js","build-mangle":"browserify index.js -s bail -p tinyify -o bail.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"ignores":["bail.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"gitHead":"ba14fe30510b1addf0fc85ec055f8557688f0a20","homepage":"https://github.com/wooorm/bail#readme","_id":"bail@1.0.4","_nodeVersion":"11.9.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww==","shasum":"7181b66d508aa3055d3f6c13f0a0c720641dde9b","tarball":"http://registry-npm.ywwl.com/bail/download/bail-1.0.4.tgz","fileCount":4,"unpackedSize":4240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0XRvCRA9TVsSAnZWagAAtlcP/1GoTyOFqLC6o7893tUz\ncC+YveDvRinx1KNzjsfMegOrkhsuNrkb0N3W4VUlk+UWp/i3hfr3WaaCT3/B\nGsLgNj3gjRrLnf+UXs/XtC48tIOL77uDD2UP96owFUeQ/7lgDtQbGPK0f/B8\nqU10S1mSQ2uEY4fbHsWfDiBHOqGOpTK1cau/f1LHG2AjUjUCS8yz4aZv7aBU\nFX346Z8wjU6Grg0usSha7rmOV/CcEzJg0t3JM0+e+oZyMqGV0uhtR0GcFttI\nF/evIlPRUsArirLBDVue07UN1D4SyXuU5VF89hVD0ZTogjxihl8KxISgf0mi\ntlGPo+d6Lfh9MEw43+3i7k9HouK0Cs5rdW3cuCiy/Rjw7U91w22JUZuDlQIk\n56wjlgxZ165hc3aRSqab5UBWetwbYVfgktulTa320gnaDZAUTeUZjxnkDtjp\nnHXIZdPIgg6C4Mko8YbqwG3NgygMWiRaOP5WDfej35Ivcd4TUWczq8P6xfGv\nVSDLThMANtyEronJoEYV0BsYU5S231BYaweu3ZK2dHr6DAOAvrNeNFKWU0AK\nuc6ZUpNABEmWfMvwIDQZJb8GL4UjBd0r9c3LWXAmEAdwCc/rV27ZxKOKarf5\n9puXtCkPOADgnbKEhcI4/VGM92yrZ4DPWHqcXd9b335ENBEXUA+fGSuoxV83\n4dxj\r\n=cWGK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFj+HwsnuSTRBym8fYCoTGXoQx8el/iYBB4y/rY+v6SqAiEAkCnJejBPpLz/JTYuhp6cs+5QAbKY3IQuNu35l9DrFus="}],"size":2095,"noattachment":false,"key":"/bail/-/bail-1.0.4.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bail_1.0.4_1557230702677_0.1830860609772138"},"_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":1557230702812,"_cnpm_publish_time":1557230702812,"dist-tags":{"latest":"2.0.2"}}