Dosa is a JavaScript AST transpiler for instrumentation, wrapping variable accesses, function calls, binary expressions, and string literals with custom box_* functions. Version 1.0.0 is the initial stable release with no active development. It uses UglifyJS under the hood to parse and transform code, targeting debugging or runtime monitoring. Unlike Babel plugins or other instrumentation libraries, Dosa focuses on a simple, predictable transformation pattern, making it suitable for lightweight tracing but limited in customization.
npm install dosaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: import the instrument function, pass JavaScript source code, get instrumented output with wrapped calls and string literals.
Use only in development or debugging contexts; do not use in production without profiling.
Avoid using eval() or with() in source code to ensure consistent instrumentation.
Migrate to a maintained alternative like babel-plugin-istanbul or a custom Babel plugin.
Run `npm install uglify-js` alongside dosa.
Use `const dosa = require('dosa'); dosa.instrument(input);` or ES6 import.