aran-live
v0.0.1
Published
Simpler live API for Aran
Downloads
16
Readme
aran-live
This npm module is a simplified API for aran which forces live instrumentation and uses the keys of the advice as pointcut. It also uses acorn for parsign and astring for generation.
instrument = require("aran-live")(aran, advice);
Creates an instrumentation function from an Aran instance and an advice.
aran :: Aran.aran
: An Aran instance.advice :: object
: The object containing the traps and an optional sandbox.script2 = instrument(script1, scope, options)
: Insert traps to a script.script1 :: string
: Original script.scope :: array
: Passed toaran.weave(estree, scope)
.options :: object
: Passed toAcorn.parse(script, options)
.script2 :: string
: Instrumented script.