🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

bail

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bail - npm Package Compare versions

Comparing version

to
1.0.1

@@ -1,9 +0,12 @@

---
mdast:
setext: true
---
<!--remark setext-->
<!--lint disable no-multiple-toplevel-headings -->
<!--lint disable no-multiple-toplevel-headings-->
1.0.1 / 2016-07-23
==================
* Rewrite module ([`75e6d41`](https://github.com/wooorm/bail/commit/75e6d41))
* Update dev-dependencies ([`9ec98f9`](https://github.com/wooorm/bail/commit/9ec98f9))
1.0.0 / 2015-07-28
==================
/**
* @author Titus Wormer
* @copyright 2015 Titus Wormer. All rights reserved.
* @copyright 2015 Titus Wormer
* @license MIT
* @module bail

@@ -10,2 +11,5 @@ * @fileoverview Throw a given error.

/* Expose. */
module.exports = bail;
/**

@@ -28,11 +32,5 @@ * Throw a given error.

function bail(err) {
if (err) {
throw err;
}
if (err) {
throw err;
}
}
/*
* Expose.
*/
module.exports = bail;
{
"name": "bail",
"version": "1.0.0",
"version": "1.0.1",
"description": "Throw a given error",

@@ -16,35 +16,50 @@ "license": "MIT",

],
"repository": {
"type": "git",
"url": "https://github.com/wooorm/bail.git"
},
"author": "Titus Wormer <tituswormer@gmail.com>",
"repository": "https://github.com/wooorm/bail",
"bugs": "https://github.com/wooorm/bail/issues",
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)"
],
"dependencies": {},
"devDependencies": {
"browserify": "^11.0.0",
"eslint": "^0.24.0",
"esmangle": "^1.0.0",
"istanbul": "^0.3.0",
"jscs": "^2.0.0",
"jscs-jsdoc": "^1.0.0",
"mdast": "^0.27.0",
"mdast-github": "^0.3.1",
"mdast-lint": "^0.4.1",
"mdast-yaml-config": "^0.2.0",
"mocha": "^2.0.0"
"browserify": "^13.0.1",
"esmangle": "^1.0.1",
"nyc": "^7.0.0",
"remark-cli": "^1.0.0",
"remark-comment-config": "^4.0.0",
"remark-github": "^5.0.0",
"remark-lint": "^4.0.0",
"remark-validate-links": "^4.0.0",
"tape": "^4.0.0",
"xo": "^0.16.0"
},
"scripts": {
"test-api": "mocha --check-leaks test.js",
"test-coveralls": "istanbul cover _mocha --report lcovonly -- --check-leaks test.js",
"test-coverage": "istanbul cover _mocha -- --check-leaks test.js",
"test-travis": "npm run test-coveralls",
"test": "npm run test-api",
"lint-api": "eslint .",
"lint-style": "jscs --reporter inline .",
"lint": "npm run lint-api && npm run lint-style",
"make": "npm run lint && npm run test-coverage",
"build-md": "mdast . LICENSE --output --quiet",
"build-md": "remark . --quiet --frail",
"build-bundle": "browserify index.js --bare -s bail > bail.js",
"postbuild-bundle": "esmangle bail.js > bail.min.js",
"build": "npm run build-md && npm run build-bundle"
"build-mangle": "esmangle bail.js > bail.min.js",
"build": "npm run build-md && npm run build-bundle && npm run build-mangle",
"lint": "xo",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js",
"test": "npm run build && npm run lint && npm run test-coverage"
},
"xo": {
"space": true,
"ignores": [
"bail.js",
"bail.min.js"
]
},
"remarkConfig": {
"output": true,
"plugins": [
"comment-config",
"github",
"lint",
"validate-links"
],
"settings": {
"bullet": "*"
}
}
}

@@ -1,3 +0,5 @@

# bail [![Build Status](https://img.shields.io/travis/wooorm/bail.svg)](https://travis-ci.org/wooorm/bail) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/bail.svg)](https://codecov.io/github/wooorm/bail?branch=master)
# bail [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
<!--lint disable heading-increment list-item-spacing-->
:warning: Throw a given error.

@@ -7,3 +9,3 @@

[npm](https://docs.npmjs.com/cli/install):
[npm][npm-install]:

@@ -14,7 +16,2 @@ ```bash

**bail** is also available for [bower](http://bower.io/#install-packages),
[component](https://github.com/componentjs/component), [duo](http://duojs.org/#getting-started),
and for AMD, CommonJS, and globals ([uncompressed](bail.js) and
[compressed](bail.min.js)).
## Usage

@@ -36,20 +33,44 @@

### bail(err?)
### `bail([err])`
Throw a given error.
**Parameters**
###### Parameters
* `err` (`Error`, optional) — Optional error.
* `err` (`Error?`) — Optional error.
**Throws**
###### Throws
* `Error` - `err`, When given.
* `Error` — Given error, if any.
## Why
## Related
No one modularized this yet. And the name was available.
* [`noop`][noop];
* [`noop2`][noop2];
* [`noop3`][noop3];
## License
[MIT](LICENSE) @ [Titus Wormer](http://wooorm.com)
[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

Sorry, the diff of this file is not supported yet