8000 GitHub - tri2820/js-instrumenter
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tri2820/js-instrumenter

Repository files navigation

js-instrumenter

js-instrumenter is a tool for instrumenting JavaScript code to log function calls and arrow function expressions.

Installation

You can install js-instrumenter via npm:

npm install js-instrumenter

Usage

CLI

To instrument a JavaScript file using the CLI:

js-instrumenter <input-file>

This will generate an instrumented version of the input file with .instrumented.js extension.

Node.js

You can also use js-instrumenter programmatically in your Node.js code:

const fs = require("fs");
const instrumentCode = require("js-instrumenter");

const code = fs.readFileSync("example.js", "utf8");
const instrumentedCode = instrumentCode(code);

fs.writeFileSync("example.instrumented.js", instrumentedCode);

License

This project is licensed under the ISC License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0