{"_id":"astw","_rev":"86331","name":"astw","description":"walk the ast with references to parent nodes","dist-tags":{"latest":"2.2.0"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"time":{"modified":"2021-06-03T10:28:01.000Z","created":"2013-03-02T10:32:36.939Z","2.2.0":"2017-03-01T22:40:29.169Z","2.1.0":"2017-03-01T22:38:29.903Z","2.0.0":"2015-04-25T20:22:02.472Z","1.3.0":"2015-03-14T23:11:34.248Z","1.2.0":"2014-03-20T08:08:02.790Z","1.1.0":"2014-03-18T23:03:30.177Z","1.0.0":"2014-03-05T01:36:26.860Z","0.1.0":"2014-02-01T06:11:18.168Z","0.0.0":"2013-03-02T10:32:36.939Z"},"users":{},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"repository":{"type":"git","url":"git://github.com/substack/astw.git"},"versions":{"2.2.0":{"name":"astw","version":"2.2.0","description":"walk the ast with references to parent nodes","main":"index.js","dependencies":{"acorn":"^4.0.3"},"devDependencies":{"tape":"~2.4.1","escodegen":"~0.0.17"},"scripts":{"test":"tape 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","acorn"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"259814b32cb1e519b4ab000ef78e3a2e41e06b83","bugs":{"url":"https://github.com/substack/astw/issues"},"_id":"astw@2.2.0","_shasum":"7bd41784d32493987aeb239b6b4e1c57a873b917","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.3.1","_npmUser":{"name":"substack","email":"substack@gmail.com"},"dist":{"shasum":"7bd41784d32493987aeb239b6b4e1c57a873b917","size":2755,"noattachment":false,"key":"/astw/-/astw-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-2.2.0.tgz"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/astw-2.2.0.tgz_1488408027455_0.8346918139141053"},"directories":{},"publish_time":1488408029169,"_cnpm_publish_time":1488408029169,"_hasShrinkwrap":false},"2.1.0":{"name":"astw","version":"2.1.0","description":"walk the ast with references to parent nodes","main":"index.js","dependencies":{"acorn":"^4.0.3"},"devDependencies":{"tape":"~2.4.1","escodegen":"~0.0.17"},"scripts":{"test":"tape 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","acorn"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"08c1a00cb52492b2cb442d20fd2856c6453c6383","bugs":{"url":"https://github.com/substack/astw/issues"},"_id":"astw@2.1.0","_shasum":"48b074c20a5695ca220113eb999d33528902f32c","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.3.1","_npmUser":{"name":"substack","email":"substack@gmail.com"},"dist":{"shasum":"48b074c20a5695ca220113eb999d33528902f32c","size":2686,"noattachment":false,"key":"/astw/-/astw-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-2.1.0.tgz"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/astw-2.1.0.tgz_1488407908168_0.2304594877641648"},"directories":{},"publish_time":1488407909903,"_cnpm_publish_time":1488407909903,"_hasShrinkwrap":false},"2.0.0":{"name":"astw","version":"2.0.0","description":"walk the ast with references to parent nodes","main":"index.js","dependencies":{"acorn":"^1.0.3"},"devDependencies":{"tape":"~2.4.1","escodegen":"~0.0.17"},"scripts":{"test":"tape 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","acorn"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"c2c3527430c94a9379eb05f50dab74314e54e940","bugs":{"url":"https://github.com/substack/astw/issues"},"_id":"astw@2.0.0","_shasum":"08121ac8288d35611c0ceec663f6cd545604897d","_from":".","_npmVersion":"2.7.5","_nodeVersion":"1.6.3","_npmUser":{"name":"substack","email":"substack@gmail.com"},"dist":{"shasum":"08121ac8288d35611c0ceec663f6cd545604897d","size":2695,"noattachment":false,"key":"/astw/-/astw-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-2.0.0.tgz"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"directories":{},"publish_time":1429993322472,"_cnpm_publish_time":1429993322472,"_hasShrinkwrap":false},"1.3.0":{"name":"astw","version":"1.3.0","description":"walk the ast with references to parent nodes","main":"index.js","dependencies":{"esprima":"^2.1.0"},"devDependencies":{"tape":"~2.4.1","escodegen":"~0.0.17"},"scripts":{"test":"tape 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","gitHead":"6aa962f39fb28de20e2ef44102a086f3dcdb4bb2","bugs":{"url":"https://github.com/substack/astw/issues"},"_id":"astw@1.3.0","_shasum":"015774a6427ad3b9ec46d7a2b41ae73dac624ca5","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.12.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"dist":{"shasum":"015774a6427ad3b9ec46d7a2b41ae73dac624ca5","size":2613,"noattachment":false,"key":"/astw/-/astw-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-1.3.0.tgz"},"directories":{},"publish_time":1426374694248,"_cnpm_publish_time":1426374694248,"_hasShrinkwrap":false},"1.2.0":{"name":"astw","version":"1.2.0","description":"walk the ast with references to parent nodes","main":"index.js","dependencies":{"esprima-fb":"3001.1.0-dev-harmony-fb"},"devDependencies":{"tape":"~2.4.1","escodegen":"~0.0.17"},"scripts":{"test":"tape 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","bugs":{"url":"https://github.com/substack/astw/issues"},"_id":"astw@1.2.0","dist":{"shasum":"f53bdd0288bc598d7f302f394246a235da51c1b4","size":2650,"noattachment":false,"key":"/astw/-/astw-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-1.2.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"directories":{},"publish_time":1395302882790,"_hasShrinkwrap":false,"_cnpm_publish_time":1395302882790},"1.1.0":{"name":"astw","version":"1.1.0","description":"walk the ast with references to parent nodes","main":"index.js","dependencies":{"esprima-fb":"3001.1.0-dev-harmony-fb"},"devDependencies":{"tape":"~2.4.1","escodegen":"~0.0.17"},"scripts":{"test":"tape 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","bugs":{"url":"https://github.com/substack/astw/issues"},"_id":"astw@1.1.0","dist":{"shasum":"f394778ab01c4ea467e64a614ed896ace0321a34","size":2504,"noattachment":false,"key":"/astw/-/astw-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-1.1.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"directories":{},"publish_time":1395183810177,"_hasShrinkwrap":false,"_cnpm_publish_time":1395183810177},"1.0.0":{"name":"astw","version":"1.0.0","description":"walk the ast with references to parent nodes","main":"index.js","dependencies":{"esprima":"1.0.4"},"devDependencies":{"tape":"~2.4.1","escodegen":"~0.0.17"},"scripts":{"test":"tape 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","bugs":{"url":"https://github.com/substack/astw/issues"},"_id":"astw@1.0.0","dist":{"shasum":"c909ddb59f77e5e869e13b75ad66960728baf65e","size":2490,"noattachment":false,"key":"/astw/-/astw-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"directories":{},"publish_time":1393983386860,"_hasShrinkwrap":false,"_cnpm_publish_time":1393983386860},"0.1.0":{"name":"astw","version":"0.1.0","description":"walk the ast with references to parent nodes","main":"index.js","dependencies":{"esprima-six":"0.0.3"},"devDependencies":{"tape":"~2.4.1","escodegen":"~0.0.17"},"scripts":{"test":"tape 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","bugs":{"url":"https://github.com/substack/astw/issues"},"_id":"astw@0.1.0","dist":{"shasum":"098be2758a6e9e9e15465d4fc4ba36265de11085","size":2495,"noattachment":false,"key":"/astw/-/astw-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"directories":{},"publish_time":1391235078168,"_hasShrinkwrap":false,"_cnpm_publish_time":1391235078168},"0.0.0":{"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","_id":"astw@0.0.0","dist":{"shasum":"4490866a3ef116aaf91adba63ca7ddf70b6d59bd","size":2505,"noattachment":false,"key":"/astw/-/astw-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/astw/download/astw-0.0.0.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":""},{"name":"zertosh","email":""}],"directories":{},"publish_time":1362220356939,"_hasShrinkwrap":false,"_cnpm_publish_time":1362220356939}},"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, opts={})\n\nReturn a `walk()` function from the source string or ast object `src`.\n\nOptionally:\n\n* `opts.ecmaVersion` - default: 8\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","_attachments":{},"homepage":"https://github.com/substack/astw","bugs":{"url":"https://github.com/substack/astw/issues"},"license":"MIT"}