# browserify-istanbul

> A browserify transform for the istanbul code coverage tool

Latest version **3.0.1** (published 2017-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install browserify-istanbul
pnpm add browserify-istanbul
yarn add browserify-istanbul
bun add browserify-istanbul
```

## 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 | 3.0.1 |
| Published | 2017-10-16 |
| First published | 2014-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 50 |
| Author | Devon Govett |
| Maintainers | alexindigo, devongovett |
| Keywords | browserify, coverage, istanbul |

## Links

- npm: https://www.npmjs.com/package/browserify-istanbul
- Repository: https://github.com/devongovett/browserify-istanbul
- Issues: https://github.com/devongovett/browserify-istanbul/issues
- npm.io page: https://npm.io/package/browserify-istanbul

## Dependencies (4)

- [through](https://npm.io/package/through.md) ^2.3.8
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1
- [istanbul-lib-instrument](https://npm.io/package/istanbul-lib-instrument.md) ^1.8.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2017-10-16
- 3.0.0 — 2017-10-16
- 2.0.0 — 2016-03-15
- 1.0.0 — 2016-02-23
- 0.2.1 — 2015-03-09
- 0.2.0 — 2015-02-23
- 0.1.5 — 2015-02-15
- 0.1.4 — 2015-02-05
- 0.1.3 — 2015-01-10
- 0.1.2 — 2014-08-13
- 0.1.1 — 2014-07-04
- 0.1.0 — 2014-05-03

## README

# browserify-istanbul

A [browserify](http://github.com/substack/node-browserify) transform for the [istanbul](https://github.com/gotwarlost/istanbul) code coverage tool.

## Installing

    npm install --save-dev browserify-istanbul

## Usage

There are several ways to register browserify transforms: on the command line, in your `package.json`, or using the browserify API.
You can use all of these with browserify-istanbul: see the [browserify docs](http://github.com/substack/node-browserify) for more info.

There are a few options available to browserify-istanbul when you use it from JavaScript.  They are shown in the following code example:

```javascript
var istanbul = require('browserify-istanbul');

// use without any options...
browserifyBundle.transform(istanbul);

// or with some options...
browserifyBundle.transform(istanbul({
  // ignore these glob paths (the ones shown are the defaults)
  ignore: ['**/node_modules/**', '**/bower_components/**', '**/test/**', '**/tests/**', '**/*.json'],

  // by default, any paths you include in the ignore option are ignored
  // in addition to the defaults. set the defaultIgnore option to false
  // to only ignore the paths you specify.
  defaultIgnore: true
}));
```

### Command line

- without options:

```
./node_modules/.bin/browserify -t browserify-istanbul test/test-*.js -o bundle.js
```

- with options

```
./node_modules/.bin/browserify -t [ browserify-istanbul --ignore "**/bower_components/**" ] test/test-*.js -o bundle.js
```

### Interacting With Coverage Reports

To load and manipulate coverage reports, the command line tool [nyc](https://www.npmjs.com/package/nyc) can be used:

1. output the the `__coverage__` object to `./.nyc_output/coverage.json`.
  * this can be facilitated using a library like [mocha-phantomjs-istanbul](https://www.npmjs.com/package/mocha-phantomjs-istanbul).
2. execute nyc with a list of [reporters](https://github.com/istanbuljs/istanbul-reports/tree/master/lib).
  * `nyc report --reporter=lcov --reporter=text-summary`.

See [istanbul.js.org](https://istanbul.js.org/) for more examples and documentation.

## License

MIT

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