API Docs for: 0.3.0
Show:

Istanbul Class

Defined in: index.js:15
Module: main

the top-level API for istanbul. provides access to the key libraries in istanbul so you can write your own tools using istanbul as a library.

Usage

 var istanbul = require('istanbul');

Item Index

Methods

Properties

Methods

matcherFor

(
  • options
  • callback
)
static

Defined in index.js:88

asynchronously returns a function that can match filesystem paths. The function returned in the callback may be passed directly as a matcher to the functions in the hook module.

When no options are passed, the match function is one that matches all JS files under the current working directory except ones under node_modules

Match patterns are ant-style patterns processed using the fileset library. Examples not provided due to limitations in putting asterisks inside jsdoc comments. Please refer to tests under test/other/test-matcher.js for examples.

Parameters:

  • options Object

    Optional. Lookup options.

    • [root] String optional

      the root of the filesystem tree under which to match files. Defaults to process.cwd()

    • [includes] Array optional

      an array of include patterns to match. Defaults to all JS files under the root.

    • [excludes] Array optional

      and array of exclude patterns. File paths matching these patterns will be excluded by the returned matcher. Defaults to files under node_modules found anywhere under root.

  • callback Function(err, matchFunction)

    The callback that is called with two arguments. The first is an Error object in case of errors or a falsy value if there were no errors. The second is a function that may be use as a matcher.

Properties

Collector

Collector static

Defined in index.js:46

the Collector class

config

Config static

Defined in index.js:67

the config module

ContentWriter

ContentWriter static

Defined in index.js:131

the abstract ContentWriter class

FileWriter

FileWriter static

Defined in index.js:138

the concrete FileWriter class

hook

Hook static

Defined in index.js:53

the hook module

Instrumenter

Instrumenter static

Defined in index.js:32

the Instrumenter class.

Report

Report static

Defined in index.js:60

the Report class

Reporter

Reporter static

Defined in index.js:74

the Reporter class

Store

Store static

Defined in index.js:39

the Store class.

utils

ObjectUtils static

Defined in index.js:81

utility for processing coverage objects

VERSION

String static

Defined in index.js:117

the version of the library

Writer

Writer static

Defined in index.js:124

the abstract Writer class