js-instrumenter is a tool for instrumenting JavaScript code to log function calls and arrow function expressions.
You can install js-instrumenter via npm:
npm install js-instrumenter
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.
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);
This project is licensed under the ISC License.