UNPKG

958 BMarkdownView Raw
1istanbul-lib-instrument
2-----------------------
3
4[![Build Status](https://travis-ci.org/istanbuljs/istanbul-lib-instrument.svg?branch=master)](https://travis-ci.org/istanbuljs/istanbul-lib-instrument)
5
6Istanbul instrumenter library.
7
8Version 1.1.x now implements instrumentation using `Babel`. The implementation is inspired
9by prior art by @dtinth as demonstrated in the `__coverage__` babel plugin.
10
11It provides 2 "modes" of instrumentation.
12
13* The old API that is mostly unchanged (except for incompatibilities noted) and
14 performs the instrumentation using babel as a library.
15
16* A `programVisitor` function for the Babel AST that can be used by a Babel plugin
17 to emit instrumentation for ES6 code directly without any source map
18 processing. This is the preferred path for babel users. The Babel plugin is
19 called `babel-plugin-istanbul`.
20
21Incompatibilities and changes to instrumentation behavior can be found in
22[v0-changes.md](v0-changes.md).
23
24