{"id":13682350,"url":"https://github.com/estools/esquery","last_synced_at":"2025-05-12T13:28:07.973Z","repository":{"id":9515984,"uuid":"11412938","full_name":"estools/esquery","owner":"estools","description":"ECMAScript AST query library.","archived":false,"fork":false,"pushed_at":"2025-03-05T03:38:02.000Z","size":448,"stargazers_count":851,"open_issues_count":41,"forks_count":92,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-08T09:02:56.448Z","etag":null,"topics":["ast","ecmascript","estree","javascript"],"latest_commit_sha":null,"homepage":"http://estools.github.io/esquery/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dangdangdotcom/sharding-jdbc","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/estools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2013-07-15T02:19:39.000Z","updated_at":"2025-05-01T22:00:50.000Z","dependencies_parsed_at":"2024-02-26T01:49:18.753Z","dependency_job_id":"6812eecf-d0f2-4c36-8edc-0460fb3614b2","html_url":"https://github.com/estools/esquery","commit_stats":{"total_commits":137,"total_committers":24,"mean_commits":5.708333333333333,"dds":0.7664233576642336,"last_synced_commit":"07ee329d6aaa6e468114687468e5c6f28a7b7beb"},"previous_names":["jrfeenst/esquery"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/estools","download_url":"https://codeload.github.com/estools/esquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253692392,"owners_count":21948314,"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","ecmascript","estree","javascript"],"created_at":"2024-08-02T13:01:44.605Z","updated_at":"2025-05-12T13:28:07.922Z","avatar_url":"https://github.com/estools.png","language":"JavaScript","readme":"ESQuery is a library for querying the AST output by Esprima for patterns of syntax using a CSS style selector system. Check out the demo:\n\n[demo](https://estools.github.io/esquery/)\n\nThe following selectors are supported:\n* AST node type: `ForStatement`\n* [wildcard](http://dev.w3.org/csswg/selectors4/#universal-selector): `*`\n* [attribute existence](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr]`\n* [attribute value](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr=\"foo\"]` or `[attr=123]`\n* attribute regex: `[attr=/foo.*/]` or (with flags) `[attr=/foo.*/is]`\n* attribute conditions: `[attr!=\"foo\"]`, `[attr\u003e2]`, `[attr\u003c3]`, `[attr\u003e=2]`, or `[attr\u003c=3]`\n* nested attribute: `[attr.level2=\"foo\"]`\n* field: `FunctionDeclaration \u003e Identifier.id`\n* [First](http://dev.w3.org/csswg/selectors4/#the-first-child-pseudo) or [last](http://dev.w3.org/csswg/selectors4/#the-last-child-pseudo) child: `:first-child` or `:last-child`\n* [nth-child](http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo) (no ax+b support): `:nth-child(2)`\n* [nth-last-child](http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo) (no ax+b support): `:nth-last-child(1)`\n* [descendant](http://dev.w3.org/csswg/selectors4/#descendant-combinators): `ancestor descendant`\n* [child](http://dev.w3.org/csswg/selectors4/#child-combinators): `parent \u003e child`\n* [following sibling](http://dev.w3.org/csswg/selectors4/#general-sibling-combinators): `node ~ sibling`\n* [adjacent sibling](http://dev.w3.org/csswg/selectors4/#adjacent-sibling-combinators): `node + adjacent`\n* [negation](http://dev.w3.org/csswg/selectors4/#negation-pseudo): `:not(ForStatement)`\n* [has](https://drafts.csswg.org/selectors-4/#has-pseudo): `:has(ForStatement)`, `:has(\u003e ForStatement)`\n* [matches-any](http://dev.w3.org/csswg/selectors4/#matches): `:is([attr] \u003e :first-child, :last-child)`\n* [subject indicator](http://dev.w3.org/csswg/selectors4/#subject): `!IfStatement \u003e [name=\"foo\"]`\n* class of AST node: `:statement`, `:expression`, `:declaration`, `:function`, or `:pattern`\n\n[![Build Status](https://travis-ci.org/estools/esquery.png?branch=master)](https://travis-ci.org/estools/esquery)\n","funding_links":[],"categories":["JavaScript","语法解析"],"sub_categories":["redux 扩展","macros","Traversal"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festools%2Fesquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Festools%2Fesquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festools%2Fesquery/lists"}