{"id":13847238,"url":"https://github.com/rajasegar/ast-node-finder","last_synced_at":"2025-07-12T08:31:28.188Z","repository":{"id":36461181,"uuid":"223106531","full_name":"rajasegar/ast-node-finder","owner":"rajasegar","description":"AST Node Find api automatically generated from code","archived":true,"fork":false,"pushed_at":"2022-05-23T09:58:03.000Z","size":1213,"stargazers_count":6,"open_issues_count":9,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-21T21:42:30.223Z","etag":null,"topics":["abstract-syntax-tree","ast","jscodeshift"],"latest_commit_sha":null,"homepage":"https://ast-tooling.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rajasegar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-21T06:42:39.000Z","updated_at":"2023-01-28T00:34:29.000Z","dependencies_parsed_at":"2022-08-08T15:01:01.490Z","dependency_job_id":null,"html_url":"https://github.com/rajasegar/ast-node-finder","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/rajasegar/ast-node-finder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fast-node-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fast-node-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fast-node-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fast-node-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajasegar","download_url":"https://codeload.github.com/rajasegar/ast-node-finder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fast-node-finder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264962217,"owners_count":23689764,"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":["abstract-syntax-tree","ast","jscodeshift"],"created_at":"2024-08-04T18:01:14.179Z","updated_at":"2025-07-12T08:31:27.233Z","avatar_url":"https://github.com/rajasegar.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# ast-node-finder\n![Build and Deploy](https://github.com/rajasegar/ast-node-finder/workflows/Node%20CI/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/rajasegar/ast-node-finder/badge.svg?branch=refs/heads/master)](https://coveralls.io/github/rajasegar/ast-node-finder?branch=refs/heads/master)\n[![Version](https://img.shields.io/npm/v/ast-node-finder.svg)](https://npmjs.org/package/ast-node-finder)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\n**WARNING:**\nRepository moved here https://github.com/rajasegar/ast-tooling/tree/master/packages/ast-node-finder\n\n\n[jscodeshift](https://github.com/facebook/jscodeshift) find api automatically generated from code\n\nCheckout the api in this [playground](https://rajasegar.github.io/ast-finder/)\n\nRead the [introductory blog post](http://hangaroundtheweb.com/2019/12/ast-finder-finding-ast-nodes-from-code/) for more details.\n\n## Usage\n```js\nimport { findQuery } from 'ast-node-finder';\nimport { parse } from 'recast';\n\nconst source = `foo.bar.baz(1,2,3)`;\n\nconst ast = parse(source);\n\n// Pass the node from ast and get the find api\nconsole.log(findQuery(ast.program.body[0].expression));\n```\n\n### Output\n\n```js\nroot.find(j.CallExpression, {\n  callee: {\n    object: {   object: { name: 'foo' },\n    property: { name: 'bar' }\n  },\n  property: { name: 'baz' }\n  }\n})\n.forEach(path =\u003e {\n  // Manipulate the path (node) here\n});\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajasegar%2Fast-node-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajasegar%2Fast-node-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajasegar%2Fast-node-finder/lists"}