{"id":15394982,"url":"https://github.com/goto-bus-stop/dash-ast","last_synced_at":"2025-04-06T03:10:23.187Z","repository":{"id":32495774,"uuid":"135448357","full_name":"goto-bus-stop/dash-ast","owner":"goto-bus-stop","description":"walk an AST, quickly","archived":false,"fork":false,"pushed_at":"2024-10-28T04:21:00.000Z","size":34,"stargazers_count":12,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"default","last_synced_at":"2025-03-30T02:07:40.672Z","etag":null,"topics":["ast","estree","javascript","tree-walker"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goto-bus-stop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-30T13:40:25.000Z","updated_at":"2025-02-01T18:55:41.000Z","dependencies_parsed_at":"2024-10-19T02:13:07.045Z","dependency_job_id":"2039c18b-01cc-47e0-97d7-ffc8705cc5ea","html_url":"https://github.com/goto-bus-stop/dash-ast","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.1875,"last_synced_commit":"042e1785777e57086b3eee345160a3272e15c4cb"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fdash-ast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fdash-ast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fdash-ast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fdash-ast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goto-bus-stop","download_url":"https://codeload.github.com/goto-bus-stop/dash-ast/tar.gz/refs/heads/default","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","estree","javascript","tree-walker"],"created_at":"2024-10-01T15:25:12.465Z","updated_at":"2025-04-06T03:10:23.158Z","avatar_url":"https://github.com/goto-bus-stop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dash-ast\n\nwalk an AST, quickly\n\n[![npm][npm-image]][npm-url]\n[![travis][travis-image]][travis-url]\n[![standard][standard-image]][standard-url]\n\n[npm-image]: https://img.shields.io/npm/v/dash-ast.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/dash-ast\n[travis-image]: https://img.shields.io/travis/goto-bus-stop/dash-ast.svg?style=flat-square\n[travis-url]: https://travis-ci.org/goto-bus-stop/dash-ast\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: http://npm.im/standard\n\n## Install\n\n```\nnpm install dash-ast\n```\n\n## Usage\n\n```js\nvar dashAst = require('dash-ast')\nvar isIdentifier = require('estree-is-identifier')\n\nvar deps = []\ndashAst(ast, function (node, parent) {\n  if (node.type === 'CallExpression' \u0026\u0026 isIdentifier(node.callee, 'require')) {\n    deps.push(node.arguments[0])\n  }\n})\n```\n\n## API\n\n### `dashAst(ast, callback)`\n\nCall `callback(node, parent)` on each node in `ast`. This does a preorder traversal, i.e. `callback` receives child nodes _after_ the parent node.\n\n### `dashAst(ast, { enter, leave })`\n\nCall `enter(node, parent)` on each node in `ast` before traversing its children, and call `leave(enter, parent)` on each node _after_ traversing its children. If a node does not have children, `enter()` and `leave()` are called immediately after each other.\n\n## License\n\n[Apache-2.0](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Fdash-ast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoto-bus-stop%2Fdash-ast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Fdash-ast/lists"}