{ "name": "astw", "version": "0.0.0", "description": "walk the ast with references to parent nodes", "main": "index.js", "dependencies": { "esprima": "1.0.2" }, "devDependencies": { "tape": "~0.2.2", "tap": "~0.4.0", "escodegen": "~0.0.17" }, "scripts": { "test": "tap test/*.js" }, "testling": { "files": "test/*.js", "browsers": [ "ie/6..latest", "chrome/20..latest", "firefox/10..latest", "safari/latest", "opera/11.0..latest", "iphone/6", "ipad/6" ] }, "repository": { "type": "git", "url": "git://github.com/substack/astw.git" }, "homepage": "https://github.com/substack/astw", "keywords": [ "ast", "walk", "source", "esprima" ], "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "license": "MIT", "readme": "# astw\n\nwalk the ast\n\n[![browser support](http://ci.testling.com/substack/astw.png)](http://ci.testling.com/substack/astw)\n\n[![build status](https://secure.travis-ci.org/substack/astw.png)](http://travis-ci.org/substack/astw)\n\nThis module is a faster version of\n[falafel](https://github.com/substack/node-falafel)\nthat only does ast walking and `.parent` tracking, not source transforms.\n\n# example\n\n``` js\nvar astw = require('astw');\nvar deparse = require('escodegen').generate;\nvar walk = astw('4 + beep(5 * 2)');\n\nwalk(function (node) {\n var src = deparse(node);\n console.log(node.type + ' :: ' + JSON.stringify(src));\n});\n```\n\n# methods\n\n``` js\nvar astw = require('astw')\n```\n\n## var walk = astw(src)\n\nReturn a `walk()` function from the source string or ast object `src`.\n\n## walk(cb)\n\nWalk the nodes in the ast with `cb(node)` where `node` is each element in the\nast from [esprima](http://esprima.org/) but with an additional `.parent`\nreference to the parent node.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install astw\n```\n\n# license\n\nMIT\n", "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/astw/issues" }, "_id": "astw@0.0.0", "dist": { "shasum": "0d3fe560a7f66882abd476e0748308d40342714a" }, "_from": "astw@~0.0.0", "_resolved": "https://registry.npmjs.org/astw/-/astw-0.0.0.tgz" }