aran-live

0.0.1 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i aran-live

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

2.85 kB

Total Files

4

Last publish

Collaborators

  • lachrist