{"versions":{"1.2.0":{"name":"fresh-falafel","description":"transform the ast on a recursive walk","version":"1.2.0","repository":{"type":"git","url":"git://github.com/substack/node-falafel.git"},"main":"index.js","keywords":["ast","burrito","source","syntax","traversal","tree"],"directories":{"example":"example","test":"test"},"scripts":{"coverage":"covert test/*.js","test":"node --harmony test/bin/run.js test/*.js"},"dependencies":{"acorn":"^1.0.3","foreach":"^2.0.5","isarray":"0.0.1","object-keys":"^1.0.6"},"devDependencies":{"covert":"^1.1.0","acorn-jsx":"^2.0.0","tape":"^4.0.0"},"engines":{"node":">=0.4.0"},"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"testling":{"browsers":{"chrome":["20.0"],"firefox":["10.0","15.0"],"iexplore":["6.0","7.0","8.0","9.0"],"opera":["12.0"],"safari":["5.1"]},"files":"test/*.js"},"gitHead":"7e710ae9ee5a9be07a8b4c7a65e8a61002210973","bugs":{"url":"https://github.com/substack/node-falafel/issues"},"homepage":"https://github.com/substack/node-falafel#readme","_id":"fresh-falafel@1.2.0","_shasum":"5966dee95fb35d2a29b12d2f25168b17225e4b6c","_from":".","_npmVersion":"2.14.5","_nodeVersion":"0.12.0","_npmUser":{"name":"anonymous","email":"royriojas@gmail.com"},"maintainers":[{"name":"anonymous","email":"royriojas@gmail.com"}],"dist":{"shasum":"5966dee95fb35d2a29b12d2f25168b17225e4b6c","size":4845,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fresh-falafel/-/fresh-falafel-1.2.0.tgz","integrity":"sha512-+YpLuSLPut+J/dIbkm1RpaFypWobc4XcjeksDqzO5gcnK9X++nnmxQm/QifdWA2OM6lHI26rxCoHDur9YJL0oA=="},"publish_time":1447552779802,"_hasShrinkwrap":false,"_cnpm_publish_time":1447552779802,"_cnpmcore_publish_time":"2021-12-16T18:16:09.137Z","contributors":[]},"0.2.6":{"name":"fresh-falafel","description":"transform the ast on a recursive walk","version":"0.2.6","repository":{"type":"git","url":"https://github.com/royriojas/node-falafel.git"},"main":"index.js","keywords":["ast","source","traversal","syntax","tree","burrito"],"directories":{"example":"example","test":"test"},"scripts":{"test":"node --harmony test/bin/run.js test/*.js"},"dependencies":{"esprima":"^2.0.0"},"devDependencies":{"esprima-fb":"^12001.1.0-dev-harmony-fb","tape":"~0.0.2"},"engine":"node >= 0.8.0","license":"MIT","testling":{"files":"test/*.js","browsers":{"iexplore":["6.0","7.0","8.0","9.0"],"chrome":["20.0"],"firefox":["10.0","15.0"],"safari":["5.1"],"opera":["12.0"]}},"gitHead":"adddb0374e2240317189d0dc4f1315768305f8d0","bugs":{"url":"https://github.com/royriojas/node-falafel/issues"},"homepage":"https://github.com/royriojas/node-falafel","_id":"fresh-falafel@0.2.6","_shasum":"3775b982055fdffb1f48cb17755164f8fc522339","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.12.0","_npmUser":{"name":"anonymous","email":"royriojas@gmail.com"},"maintainers":[{"name":"anonymous","email":"royriojas@gmail.com"}],"dist":{"shasum":"3775b982055fdffb1f48cb17755164f8fc522339","size":10858,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fresh-falafel/-/fresh-falafel-0.2.6.tgz","integrity":"sha512-Gqty0oJL9t/q3Aj4/rTHRKB0KkqY/VPqYYUmCp50JjJU0f0ybBclw316scFzRSy/s9xEBIJe4p8BbhsR+0MzZw=="},"publish_time":1425010751116,"_hasShrinkwrap":false,"_cnpm_publish_time":1425010751116,"_cnpmcore_publish_time":"2021-12-16T18:16:09.427Z","contributors":[]},"0.2.5":{"name":"fresh-falafel","description":"transform the ast on a recursive walk","version":"0.2.5","repository":{"type":"git","url":"https://github.com/royriojas/node-falafel.git"},"main":"index.js","keywords":["ast","source","traversal","syntax","tree","burrito"],"directories":{"example":"example","test":"test"},"scripts":{"test":"node --harmony test/bin/run.js test/*.js"},"dependencies":{"esprima":"git+https://github.com/substack/esprima#is-keyword"},"devDependencies":{"esprima-fb":"^12001.1.0-dev-harmony-fb","tape":"~0.0.2"},"engine":"node >= 0.8.0","license":"MIT","testling":{"files":"test/*.js","browsers":{"iexplore":["6.0","7.0","8.0","9.0"],"chrome":["20.0"],"firefox":["10.0","15.0"],"safari":["5.1"],"opera":["12.0"]}},"gitHead":"2769bd654a6d92e83f0d5ab1049b829146e3d55b","bugs":{"url":"https://github.com/royriojas/node-falafel/issues"},"homepage":"https://github.com/royriojas/node-falafel","_id":"fresh-falafel@0.2.5","_shasum":"0e7703cb0c34717d9d40ac585b470b76401882a1","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"anonymous","email":"royriojas@gmail.com"},"maintainers":[{"name":"anonymous","email":"royriojas@gmail.com"}],"dist":{"shasum":"0e7703cb0c34717d9d40ac585b470b76401882a1","size":11151,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fresh-falafel/-/fresh-falafel-0.2.5.tgz","integrity":"sha512-JKyyRdefGmaUR7bDsxFC4AhAhsmjgphgKMvSRDFIGPI8XmFyLGmnp7AmQKdEdL3LfZJbynVlq/EzeUajNd/CMQ=="},"publish_time":1424777167644,"_hasShrinkwrap":false,"_cnpm_publish_time":1424777167644,"_cnpmcore_publish_time":"2021-12-16T18:16:09.618Z","contributors":[]},"0.2.4":{"name":"fresh-falafel","description":"transform the ast on a recursive walk","version":"0.2.4","repository":{"type":"git","url":"https://github.com/royriojas/node-falafel.git"},"main":"index.js","keywords":["ast","source","traversal","syntax","tree","burrito"],"directories":{"example":"example","test":"test"},"scripts":{"test":"node --harmony test/bin/run.js test/*.js"},"dependencies":{"esprima":"git+https://github.com/substack/esprima#is-keyword"},"devDependencies":{"esprima-fb":"^12001.1.0-dev-harmony-fb","tape":"~0.0.2"},"engine":"node >= 0.8.0","license":"MIT","testling":{"files":"test/*.js","browsers":{"iexplore":["6.0","7.0","8.0","9.0"],"chrome":["20.0"],"firefox":["10.0","15.0"],"safari":["5.1"],"opera":["12.0"]}},"gitHead":"6873b85373d9617102b7e332c82fbeb66904ce1c","bugs":{"url":"https://github.com/royriojas/node-falafel/issues"},"homepage":"https://github.com/royriojas/node-falafel","_id":"fresh-falafel@0.2.4","_shasum":"bc12ea615cffa34aa1915d418c8efb7d3ce7f308","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"anonymous","email":"royriojas@gmail.com"},"maintainers":[{"name":"anonymous","email":"royriojas@gmail.com"}],"dist":{"shasum":"bc12ea615cffa34aa1915d418c8efb7d3ce7f308","size":11159,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fresh-falafel/-/fresh-falafel-0.2.4.tgz","integrity":"sha512-XhXe+EBJ6nkpgBkMClHBOXss0tyazLPCo9BDaUL9/m7HEqSBSdvinaopihAb1PtsWtbHw8VatWBwbtX1PA4oGQ=="},"publish_time":1424777071380,"_hasShrinkwrap":false,"_cnpm_publish_time":1424777071380,"_cnpmcore_publish_time":"2021-12-16T18:16:09.807Z","contributors":[]},"0.2.3":{"name":"fresh-falafel","description":"transform the ast on a recursive walk","version":"0.2.3","repository":{"type":"git","url":"https://github.com/royriojas/node-falafel.git"},"main":"index.js","keywords":["ast","source","traversal","syntax","tree","burrito"],"directories":{"example":"example","test":"test"},"scripts":{"test":"node --harmony test/bin/run.js test/*.js"},"dependencies":{"esprima":"git+https://github.com/substack/esprima#is-keyword"},"devDependencies":{"esprima-fb":"^12001.1.0-dev-harmony-fb","tape":"~0.0.2"},"engine":"node >= 0.8.0","license":"MIT","testling":{"files":"test/*.js","browsers":{"iexplore":["6.0","7.0","8.0","9.0"],"chrome":["20.0"],"firefox":["10.0","15.0"],"safari":["5.1"],"opera":["12.0"]}},"gitHead":"3ab3c6ad8006d9a7cc45c1b37d91f38a381b4756","bugs":{"url":"https://github.com/royriojas/node-falafel/issues"},"homepage":"https://github.com/royriojas/node-falafel","_id":"fresh-falafel@0.2.3","_shasum":"d7848c2ae52c8df9dae5e78990b7b3fe69d4ed5e","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"anonymous","email":"royriojas@gmail.com"},"maintainers":[{"name":"anonymous","email":"royriojas@gmail.com"}],"dist":{"shasum":"d7848c2ae52c8df9dae5e78990b7b3fe69d4ed5e","size":10950,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fresh-falafel/-/fresh-falafel-0.2.3.tgz","integrity":"sha512-VGrEJR/FTP2Vm5FjCb5Xvz4oKr5AdDlNvSZw036k3pj0ry8T07uBohQc5G99iKzDrDx/70Jpuj9liFmlp+BFXw=="},"publish_time":1424768589979,"_hasShrinkwrap":false,"_cnpm_publish_time":1424768589979,"_cnpmcore_publish_time":"2021-12-16T18:16:10.060Z","contributors":[]}},"dist-tags":{"latest":"1.2.0"},"name":"fresh-falafel","time":{"created":"2022-01-26T22:59:53.249Z","modified":"2022-01-26T22:59:53.249Z","1.2.0":"2015-11-15T01:59:39.802Z","0.2.6":"2015-02-27T04:19:11.116Z","0.2.5":"2015-02-24T11:26:07.644Z","0.2.4":"2015-02-24T11:24:31.380Z","0.2.3":"2015-02-24T09:03:09.979Z"},"readme":"**IMPORTANT for fresh-falafel**\n\nThis is a fork of falafel that adds the ability to set the parser without requiring `acorn` ahead of time.\n\nIf [this](https://github.com/substack/node-falafel/pull/51) ever get merged you can use regular\nfalafel instead.\n\nOriginal readme below\n\n========\n\n# falafel\n\nTransform the [ast](http://en.wikipedia.org/wiki/Abstract_syntax_tree) on a\nrecursive walk.\n\n[![browser support](http://ci.testling.com/substack/node-falafel.png)](http://ci.testling.com/substack/node-falafel)\n\n[![build status](https://secure.travis-ci.org/substack/node-falafel.png)](http://travis-ci.org/substack/node-falafel)\n\nThis modules uses [acorn](https://npmjs.org/package/acorn) to create an AST from\nsource code.\n\n![falafel döner](http://substack.net/images/falafel.png)\n\n# example\n\n## array.js\n\nPut a function wrapper around all array literals.\n\n``` js\nvar falafel = require('falafel');\n\nvar src = '(' + function () {\n    var xs = [ 1, 2, [ 3, 4 ] ];\n    var ys = [ 5, 6 ];\n    console.dir([ xs, ys ]);\n} + ')()';\n\nvar output = falafel(src, function (node) {\n    if (node.type === 'ArrayExpression') {\n        node.update('fn(' + node.source() + ')');\n    }\n});\nconsole.log(output);\n```\n\noutput:\n\n```\n(function () {\n    var xs = fn([ 1, 2, fn([ 3, 4 ]) ]);\n    var ys = fn([ 5, 6 ]);\n    console.dir(fn([ xs, ys ]));\n})()\n```\n\n# methods\n\n``` js\nvar falafel = require('falafel')\n```\n\n## falafel(src, opts={}, fn)\n\nTransform the string source `src` with the function `fn`, returning a\nstring-like transformed output object.\n\nFor every node in the ast, `fn(node)` fires. The recursive walk is a\npre-traversal, so children get called before their parents.\n\nPerforming a pre-traversal makes it easier to write nested transforms since\ntransforming parents often requires transforming all its children first.\n\nThe return value is string-like (it defines `.toString()` and `.inspect()`) so\nthat you can call `node.update()` asynchronously after the function has\nreturned and still capture the output.\n\nInstead of passing a `src` you can also use `opts.source`.\n\nAll of the `opts` will be passed directly to\n[acorn](https://npmjs.org/package/acorn).\n\n## custom parser\n\nYou may pass in an instance of acorn to the opts as `opts.parser` to use that\nversion instead of the version of acorn packaged with this library.\n\n```js\nvar acorn = require('acorn-jsx');\n\nfalafel(src, {parser: acorn, plugins: { jsx: true }}, function(node) {\n  // this will parse jsx\n});\n```\n\n# nodes\n\nAside from the regular [esprima](http://esprima.org) data, you can also call\nsome inserted methods on nodes.\n\nAside from updating the current node, you can also reach into sub-nodes to call\nupdate functions on children from parent nodes.\n\n## node.source()\n\nReturn the source for the given node, including any modifications made to\nchildren nodes.\n\n## node.update(s)\n\nTransform the source for the present node to the string `s`.\n\nNote that in `'ForStatement'` node types, there is an existing subnode called\n`update`. For those nodes all the properties are copied over onto the\n`node.update()` function.\n\n## node.parent\n\nReference to the parent element or `null` at the root element.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install falafel\n```\n\n# license\n\nMIT","users":{}}