UNPKG

burrito

Version:

Wrap up expressions with a trace function while walking the AST with rice and beans on the side

8 lines (5 loc) 170 B
var burrito = require('burrito'); var src = burrito('f() && g(h())\nfoo()', function (node) { if (node.name === 'call') node.wrap('qqq(%s)'); }); console.log(src);