{"_id":"ast-children","_rev":"324450","name":"ast-children","description":"get the children of an AST node","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"time":{"modified":"2021-06-04T01:59:07.000Z","created":"2014-05-17T00:06:07.467Z","1.0.5":"2015-10-12T04:55:03.169Z","1.0.4":"2015-09-06T10:05:26.554Z","1.0.3":"2015-09-06T09:02:59.882Z","1.0.2":"2015-09-06T08:20:54.250Z","1.0.1":"2015-09-06T08:17:50.830Z","1.0.0":"2015-09-06T08:12:49.874Z","0.2.0":"2014-10-28T04:14:30.501Z","0.1.2":"2014-05-20T09:41:58.424Z","0.1.1":"2014-05-17T00:21:20.587Z","0.1.0":"2014-05-17T00:06:07.467Z"},"users":{},"author":{"name":"Jake Rosoman"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"versions":{"1.0.5":{"name":"ast-children","version":"1.0.5","description":"get the children of an AST node","keywords":["ast","children"],"main":"built.js","dependencies":{},"devDependencies":{"assert":"github:jkroso/assert","serve":"github:jkroso/serve","match":"github:jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*"},"transpile":[["index.js","!sourcegraph/babel->js"],["keys.json","!sourcegraph/json->js"]],"scripts":{"prepublish":"babel index.js > built.js"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"author":{"name":"Jake Rosoman"},"files":["index.js","keys.json","built.js"],"license":"MIT","gitHead":"c4fa207f520e207cd2e0a6bf1d25d411ae149f8e","bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"homepage":"https://github.com/jkroso/ast-children#readme","_id":"ast-children@1.0.5","_shasum":"d4b4400af9a128d3844b4841c9b6fe15e8ea6cce","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"d4b4400af9a128d3844b4841c9b6fe15e8ea6cce","size":2042,"noattachment":false,"key":"/ast-children/-/ast-children-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-1.0.5.tgz"},"directories":{},"publish_time":1444625703169,"_cnpm_publish_time":1444625703169,"_hasShrinkwrap":false},"1.0.4":{"name":"ast-children","version":"1.0.4","description":"get the children of an AST node","keywords":["ast","children"],"main":"built.js","dependencies":{},"devDependencies":{"assert":"github:jkroso/assert","serve":"github:jkroso/serve","match":"github:jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"transpile":[["*/index.js","!sourcegraph/babel->js"],["*/keys.json","!sourcegraph/json->js"]],"scripts":{"prepublish":"babel index.js > built.js"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"author":{"name":"Jake Rosoman"},"files":["index.js","keys.json","built.js"],"license":"MIT","gitHead":"9a29138f1c12d1cd0d3b8eb72fe472885857aa89","bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"homepage":"https://github.com/jkroso/ast-children#readme","_id":"ast-children@1.0.4","_shasum":"35ad0ea124e02ba767433fa81725747cb8407541","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"35ad0ea124e02ba767433fa81725747cb8407541","size":2037,"noattachment":false,"key":"/ast-children/-/ast-children-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-1.0.4.tgz"},"directories":{},"publish_time":1441533926554,"_cnpm_publish_time":1441533926554,"_hasShrinkwrap":false},"1.0.3":{"name":"ast-children","version":"1.0.3","description":"get the children of an AST node","keywords":["ast","children"],"main":"built.js","dependencies":{},"devDependencies":{"assert":"github:jkroso/assert","serve":"github:jkroso/serve","match":"github:jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"transpile":[["*/index.js","!sourcegraph/babel->js"],["*/keys.json","!sourcegraph/json->js"]],"scripts":{"prepublish":"babel index.js > built.js"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"author":{"name":"Jake Rosoman"},"files":["index.js","keys.json","built.js"],"license":"MIT","gitHead":"e995bc660786b39250d9595babdcb53d9f37f0dc","bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"homepage":"https://github.com/jkroso/ast-children#readme","_id":"ast-children@1.0.3","_shasum":"e77ab647ae200a8d3932bd710cb90da61c1e5820","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"e77ab647ae200a8d3932bd710cb90da61c1e5820","size":1990,"noattachment":false,"key":"/ast-children/-/ast-children-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-1.0.3.tgz"},"directories":{},"publish_time":1441530179882,"_cnpm_publish_time":1441530179882,"_hasShrinkwrap":false},"1.0.2":{"name":"ast-children","version":"1.0.2","description":"get the children of an AST node","keywords":["ast","children"],"main":"built.js","dependencies":{},"devDependencies":{"assert":"github:jkroso/assert","serve":"github:jkroso/serve","match":"github:jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"transpile":[["*/index.js","!sourcegraph/babel->js"],["*/keys.json","!sourcegraph/json->js"]],"scripts":{"prepublish":"babel index.js > built.js"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"author":{"name":"Jake Rosoman"},"files":["index.js","keys.json","built.js"],"license":"MIT","gitHead":"698c4fe68284b3c96a3ee8fb6de0b77054d454ca","bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"homepage":"https://github.com/jkroso/ast-children#readme","_id":"ast-children@1.0.2","_shasum":"17c2d85ee60c7b28a42a47cb8326e58f66e43a27","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"17c2d85ee60c7b28a42a47cb8326e58f66e43a27","size":1976,"noattachment":false,"key":"/ast-children/-/ast-children-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-1.0.2.tgz"},"directories":{},"publish_time":1441527654250,"_cnpm_publish_time":1441527654250,"_hasShrinkwrap":false},"1.0.1":{"name":"ast-children","version":"1.0.1","description":"get the children of an AST node","keywords":["ast","children"],"dependencies":{},"devDependencies":{"assert":"github:jkroso/assert","serve":"github:jkroso/serve","match":"github:jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"transpile":[["*/index.js","!sourcegraph/babel->js"],["*/keys.json","!sourcegraph/json->js"]],"scripts":{"prepublish":"babel index.js > built.js"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"author":{"name":"Jake Rosoman"},"files":["index.js","keys.json","built.js"],"license":"MIT","gitHead":"698c4fe68284b3c96a3ee8fb6de0b77054d454ca","bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"homepage":"https://github.com/jkroso/ast-children#readme","_id":"ast-children@1.0.1","_shasum":"3482918e9812b550a6fb61053652403def154133","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"3482918e9812b550a6fb61053652403def154133","size":1972,"noattachment":false,"key":"/ast-children/-/ast-children-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-1.0.1.tgz"},"directories":{},"publish_time":1441527470830,"_cnpm_publish_time":1441527470830,"_hasShrinkwrap":false},"1.0.0":{"name":"ast-children","version":"1.0.0","description":"get the children of an AST node","keywords":["ast","children"],"dependencies":{},"devDependencies":{"assert":"github:jkroso/assert","serve":"github:jkroso/serve","match":"github:jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"transpile":[["*/index.js","!sourcegraph/babel->js"],["*/keys.json","!sourcegraph/json->js"]],"scripts":{"prepublish":"babel index.js > built.js"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"author":{"name":"Jake Rosoman"},"files":["index.js","built.js"],"license":"MIT","gitHead":"5f659665478240365dd4a341372ffaac83fc6017","bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"homepage":"https://github.com/jkroso/ast-children#readme","_id":"ast-children@1.0.0","_shasum":"b9cf77bd7f15c32b36f4a6daf81dce52df113b41","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"b9cf77bd7f15c32b36f4a6daf81dce52df113b41","size":1208,"noattachment":false,"key":"/ast-children/-/ast-children-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-1.0.0.tgz"},"directories":{},"publish_time":1441527169874,"_cnpm_publish_time":1441527169874,"_hasShrinkwrap":false},"0.2.0":{"name":"ast-children","version":"0.2.0","description":"get the children of an AST node","keywords":["ast","children"],"dependencies":{},"devDependencies":{"assert":"https://github.com/jkroso/assert","serve":"https://github.com/jkroso/serve","match":"https://github.com/jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"author":{"name":"Jake Rosoman"},"files":["index.js"],"license":"MIT","gitHead":"2180cf7d94ca148981da2a6362d6a81a5550631e","homepage":"https://github.com/jkroso/ast-children","_id":"ast-children@0.2.0","scripts":{},"_shasum":"e9ba3b680b1af708dc009dec3296caa33c3f5d9f","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"e9ba3b680b1af708dc009dec3296caa33c3f5d9f","size":1583,"noattachment":false,"key":"/ast-children/-/ast-children-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-0.2.0.tgz"},"directories":{},"publish_time":1414469670501,"_cnpm_publish_time":1414469670501,"_hasShrinkwrap":false},"0.1.2":{"name":"ast-children","version":"0.1.2","description":"get the children of an AST node","keywords":["ast","children"],"dependencies":{},"devDependencies":{"assert":"git://github.com/jkroso/assert","serve":"git://github.com/jkroso/serve","match":"git://github.com/jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"author":{"name":"Jake Rosoman"},"files":["index.js"],"license":"MIT","homepage":"https://github.com/jkroso/ast-children","_id":"ast-children@0.1.2","_shasum":"1739d24e0280ab681dc5b9b6c0c47040dad6d971","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"1739d24e0280ab681dc5b9b6c0c47040dad6d971","size":1564,"noattachment":false,"key":"/ast-children/-/ast-children-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-0.1.2.tgz"},"directories":{},"publish_time":1400578918424,"_cnpm_publish_time":1400578918424,"_hasShrinkwrap":false},"0.1.1":{"name":"ast-children","version":"0.1.1","description":"get the children of an AST node","keywords":["ast","children"],"dependencies":{},"devDependencies":{"assert":"git://github.com/component/assert","serve":"git://github.com/jkroso/serve","match":"git://github.com/jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"author":{"name":"Jake Rosoman"},"files":["index.js"],"license":"MIT","homepage":"https://github.com/jkroso/ast-children","_id":"ast-children@0.1.1","_shasum":"ded9650321030bd1f09662937929acd41755cf9c","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"ded9650321030bd1f09662937929acd41755cf9c","size":1497,"noattachment":false,"key":"/ast-children/-/ast-children-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-0.1.1.tgz"},"directories":{},"publish_time":1400286080587,"_cnpm_publish_time":1400286080587,"_hasShrinkwrap":false},"0.1.0":{"name":"ast-children","version":"0.1.0","description":"get the children of an AST node","keywords":["ast","children"],"dependencies":{},"devDependencies":{"assert":"git://github.com/component/assert","serve":"git://github.com/jkroso/serve","match":"git://github.com/jkroso/match","hydro-bdd":"*","hydro-html":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"repository":{"type":"git","url":"git://github.com/jkroso/ast-children.git"},"bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"author":{"name":"Jake Rosoman"},"files":["index.js"],"license":"MIT","homepage":"https://github.com/jkroso/ast-children","_id":"ast-children@0.1.0","_shasum":"7d7410b174c1911732f4357b2112e68873559e03","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"7d7410b174c1911732f4357b2112e68873559e03","size":1496,"noattachment":false,"key":"/ast-children/-/ast-children-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-children/download/ast-children-0.1.0.tgz"},"directories":{},"publish_time":1400285167467,"_cnpm_publish_time":1400285167467,"_hasShrinkwrap":false}},"readme":"# ast-children\n\nget the children of an AST node\n\n## Installation\n\n`npm install ast-children`\n\nthen in your app:\n\n```js\nconst children = require('ast-children')\n```\n\n## API\n\n### children(node)\n\nTakes a [standard](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API) AST node and returns an `Array` of its child nodes\n\n```js\nvar ast = {\n  type: 'Program',\n  body: [\n    {\n      type: 'VariableDeclaration',\n      declarations: [\n        {\n          type: 'VariableDeclarator',\n          id: {type: 'Identifier', name: 'a'},\n          init: {type: 'Literal', value: 1}\n        },\n        {\n          type: 'VariableDeclarator',\n          id: {type: 'Identifier', name: 'b'}\n        }\n      ]\n    }\n  ]\n}\nchildren(ast) // => ast.body\nchildren(ast.body[0]) // => ast.body[0].declarations\nvar decs = ast.body[0].declarations\nchildren(decs[0]) // => [decs[0].id, decs[0].init]\nchildren(decs[1]) // => [decs[1].id]\n```\n","_attachments":{},"homepage":"https://github.com/jkroso/ast-children#readme","bugs":{"url":"https://github.com/jkroso/ast-children/issues"},"license":"MIT"}