0.0.1 • Published 6 years ago

aran-live v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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 to aran.weave(estree, scope).
    • options :: object: Passed to Acorn.parse(script, options).
    • script2 :: string: Instrumented script.
0.0.1

6 years ago

0.0.0

6 years ago