# gulp-safety-net

> Exception safe javascript wrapper

Latest version **1.0.1** (published 2015-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-safety-net
pnpm add gulp-safety-net
yarn add gulp-safety-net
bun add gulp-safety-net
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-02-26 |
| First published | 2015-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Adrian Bruinhout |
| Maintainers | webfella |
| Keywords | gulp, gulpplugin, safe, error, exception, trycatch, js, javascript, ecmascript |

## Links

- npm: https://www.npmjs.com/package/gulp-safety-net
- Repository: https://github.com/intentmedia/gulp-safety-net
- Issues: https://github.com/intentmedia/gulp-safety-net/issues
- npm.io page: https://npm.io/package/gulp-safety-net

## Dependencies (3)

- [extend](https://npm.io/package/extend.md) ^2.0.0
- [through2](https://npm.io/package/through2.md) ^0.6.3
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.3

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-02-26
- 1.0.0 — 2015-02-25

## README

# gulp-safety-net [![Build Status](https://travis-ci.org/intentmedia/gulp-safety-net.svg?branch=master)](https://travis-ci.org/intentmedia/gulp-safety-net) [![Dependencies](https://david-dm.org/intentmedia/gulp-safety-net.svg)](https://david-dm.org/intentmedia/gulp-safety-net)

> Exception safe javascript wrapper

Wraps files in a try/catch statement to not expose errors.

## Install

```
$ npm install --save-dev gulp-safety-net
```

## Usage

```js
var gulp      = require('gulp'),
    safetyNet = require('gulp-safety-net');

gulp.task('default', function () {
    return gulp.src('src/app.js')
        .pipe(safetyNet())
        .pipe(gulp.dest('dist'));
});
```

## API

### safetyNet([options])

#### options.setup
Type: `Function`
Default: `function () {}`

Allows a custom setup outside of the try/catch block.

```js
setup : function() { window.Logger = new Logger(); }
```

#### options.logger
Type: `String`
Default: `'console.log(e)'`

Provides an alternative logging call to pass the error to.

```js
logger: 'myCustomLogger(e)'
```

## License

MIT

---
_Source: https://npm.io/package/gulp-safety-net · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
