1. istanbul-lib-instrument
Core istanbul API for JS code coverage
istanbul-lib-instrument
Package: istanbul-lib-instrument
Created by: istanbuljs
Last modified: Mon, 19 Feb 2024 20:50:24 GMT
Version: 6.0.2
License: BSD-3-Clause
Downloads: 161,381,222
Repository: https://github.com/istanbuljs/istanbuljs

Install

npm install istanbul-lib-instrument
yarn add istanbul-lib-instrument

istanbul-lib-instrument

Build Status

Istanbul instrumenter library.

Version 1.1.x now implements instrumentation using Babel. The implementation is inspired
by prior art by @dtinth as demonstrated in the __coverage__ babel plugin.

It provides 2 "modes" of instrumentation.

  • The old API that is mostly unchanged (except for incompatibilities noted) and
    performs the instrumentation using babel as a library.

  • A programVisitor function for the Babel AST that can be used by a Babel plugin
    to emit instrumentation for ES6 code directly without any source map
    processing. This is the preferred path for babel users. The Babel plugin is
    called babel-plugin-istanbul.

Incompatibilities and changes to instrumentation behavior can be found in
v0-changes.md.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code