API
Aran simplifies the instrumentation of JavaScript code by transpiling it into a minimal variant called AranLang. Instrumentation is performed on AranLang before transpiling it back to JavaScript. Aran provides the following functions:
setupile
: Generates a setup program (JavaScript) that should be evaluated before any AranLang program. This requirement can be removed by settingconf.mode
ofretropile
to"standalone"
instead of"normal"
. The standalone mode works only with single-source programs.transpile
: Transpile an JavaScript program to AranLang.weaveStandard
: Weave a standard aspect into an AranLang program.weaveFlexible
: Weave a flexible aspect into an AranLang program.retropile
: Transpile an AranLang program back to JavaScript.instrument
: Instrument a JavaScript program by chaining:transpile
,weaveStandard
, andretropile
.