{"id":19584829,"url":"https://github.com/flex-development/esast","last_synced_at":"2026-01-21T04:02:00.489Z","repository":{"id":226127638,"uuid":"767832972","full_name":"flex-development/esast","owner":"flex-development","description":"ECMAScript Abstract Syntax Tree format","archived":false,"fork":false,"pushed_at":"2024-08-09T23:29:06.000Z","size":2249,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T09:21:11.894Z","etag":null,"topics":["ast","ecmascript","es","esast","javascript","js","syntax-tree","unist","unist-spec"],"latest_commit_sha":null,"homepage":"https://github.com/flex-development/esast","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flex-development.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["flex-development"]}},"created_at":"2024-03-06T01:12:20.000Z","updated_at":"2024-06-30T08:51:45.000Z","dependencies_parsed_at":"2024-03-22T00:29:31.466Z","dependency_job_id":"7fe476f0-6780-4860-a99a-5e66b0379d39","html_url":"https://github.com/flex-development/esast","commit_stats":null,"previous_names":["flex-development/esast"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/flex-development/esast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fesast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fesast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fesast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fesast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flex-development","download_url":"https://codeload.github.com/flex-development/esast/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fesast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28625926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T02:47:06.670Z","status":"ssl_error","status_checked_at":"2026-01-21T02:45:44.886Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","es","esast","javascript","js","syntax-tree","unist","unist-spec"],"created_at":"2024-11-11T07:50:00.314Z","updated_at":"2026-01-21T04:02:00.470Z","avatar_url":"https://github.com/flex-development.png","language":"TypeScript","funding_links":["https://github.com/sponsors/flex-development"],"categories":[],"sub_categories":[],"readme":"# esast\n\n[![github release](https://img.shields.io/github/v/release/flex-development/esast.svg?include_prereleases\u0026sort=semver)](https://github.com/flex-development/esast/releases/latest)\n[![npm](https://img.shields.io/npm/v/@flex-development/esast.svg)](https://npmjs.com/package/@flex-development/esast)\n[![module type: esm](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)\n[![license](https://img.shields.io/github/license/flex-development/esast.svg)](LICENSE.md)\n[![conventional commits](https://img.shields.io/badge/-conventional%20commits-fe5196?logo=conventional-commits\u0026logoColor=ffffff)](https://conventionalcommits.org/)\n[![typescript](https://img.shields.io/badge/-typescript-3178c6?logo=typescript\u0026logoColor=ffffff)](https://typescriptlang.org/)\n[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat\u0026logo=vitest\u0026logoColor=ffffff)](https://vitest.dev/)\n[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat\u0026logo=yarn\u0026logoColor=ffffff)](https://yarnpkg.com/)\n\n**E**CMA**S**cript **A**bstract **S**yntax **T**ree format.\n\n---\n\n**esast** is a specification for representing [JavaScript][javascript] as an [abstract syntax tree][unist-syntax-tree].\n\nIt implements the [**unist**][unist] spec.\n\n## Contents\n\n- [Introduction](#introduction)\n  - [Where this specification fits](#where-this-specification-fits)\n  - [ESTree](#estree)\n- [Types](#types)\n- [Nodes (abstract)](#nodes-abstract)\n  - [`Node`](#node)\n  - [`Literal`](#literal)\n  - [`Parent`](#parent)\n- [Nodes](#nodes)\n- [Glossary](#glossary)\n- [List of utilities](#list-of-utilities)\n- [Contribute](#contribute)\n\n## Introduction\n\nThis document defines a format for representing ECMAScript as an [abstract syntax tree][unist-syntax-tree]. Development\nof esast started in March 2024. This specification is written in a [TypeScript][typescript]-like grammar.\n\n### Where this specification fits\n\nesast extends [unist][unist], a format for syntax trees, to benefit from its [ecosystem of utilities][unist-utilities].\n\nesast relates to [ESTree][estree] in that the first is inspired by the latter; an esast is a unist-flavored estree.\n\nesast relates to [JavaScript][javascript] in that it represents it, but esast is not limited to JavaScript and can be\nextended to support other JavaScript-based languages, like [TypeScript][typescript].\n\n### ESTree\n\n**TODO**: estree differences\n\n## Types\n\nTypeScript users can integrate `esast` type definitions into their project by installing the appropriate packages:\n\n```sh\nyarn add @flex-development/esast\n```\n\n\u003cblockquote\u003e\n  \u003csmall\u003e\n    See \u003ca href='https://yarnpkg.com/protocol/git'\u003eGit - Protocols | Yarn\u003c/a\u003e\n    \u0026nbsp;for details regarding installing from Git.\n  \u003c/small\u003e\n\u003c/blockquote\u003e\n\n## Nodes (abstract)\n\n### `Node`\n\n```ts\ninterface Node extends unist.Node {}\n```\n\n**Node** ([**unist.Node**][unist-node]) is a syntactic unit in esast syntax trees.\n\n### `Literal`\n\n```ts\ninterface Literal extends Node {\n  value: RegExp | bigint | boolean | number | string | null | undefined\n}\n```\n\n**Literal** represents an abstract interface in esast containing a value.\n\nIts `value` field is one of the following:\n\n- a regular expression (`RegExp`)\n- a `bigint` primitive\n- a `boolean`\n- a `number`\n- a `string`\n- `null`\n- `undefined`\n\n### `Parent`\n\n```ts\ninterface Parent extends Node {\n  children: Child[]\n}\n```\n\n**Parent** represents an abstract interface in esast containing other nodes (said to be [*children*][unist-child]).\n\nThe `children` field is a list representing the children of a node.\n\n## Nodes\n\n**TODO**: nodes\n\nThis specification is a work in progess. Please refer to the [source code](src/nodes/) for preliminary documentation.\n\n## Glossary\n\nSee the [unist glossary][unist-glossary].\n\n## List of utilities\n\nSee the [unist list of utilities][unist-utilities] for more utilities.\n\n- [`estree-util-is-identifier-name`][estree-util-is-identifier-name] \u0026mdash; check if something can be an identifier name\n\n## Related\n\n- [`docast`][docast] \u0026mdash; docblock abstract syntax tree format\n- [`mdast`][mdast] \u0026mdash; markdown abstract syntax tree format\n\n## Contribute\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\nIdeas for new utilities and tools can be posted in [esast/ideas][esast-ideas].\n\nThis project has a [code of conduct](CODE_OF_CONDUCT.md). By interacting with this repository, organization, or\ncommunity you agree to abide by its terms.\n\n[docast]: https://github.com/flex-development/docast\n[esast-ideas]: https://github.com/flex-development/esast/discussions/new?category=idea\n\n\u003c!-- [esast-util-attach-comments]: https://github.com/flex-development/esast-util-attach-comments --\u003e\n\u003c!-- [esast-util-from-estree]: https://github.com/flex-development/esast-util-from-estree --\u003e\n\u003c!-- [esast-util-from-js]: https://github.com/flex-development/esast-util-from-js --\u003e\n\u003c!-- [esast-util-from-value]: https://github.com/flex-development/esast-util-from-value --\u003e\n\u003c!-- [esast-util-to-estree]: https://github.com/flex-development/esast-util-to-estree --\u003e\n\u003c!-- [esast-util-to-js]: https://github.com/flex-development/esast-util-to-js --\u003e\n\n[estree-util-is-identifier-name]: https://github.com/syntax-tree/estree-util-is-identifier-name\n[estree]: https://github.com/estree/estree\n[javascript]: https://tc39.es/ecma262\n[mdast]: https://github.com/syntax-tree/mdast\n[typescript]: https://typescriptlang.org\n[unist-child]: https://github.com/syntax-tree/unist#child\n[unist-glossary]: https://github.com/syntax-tree/unist#glossary\n[unist-node]: https://github.com/syntax-tree/unist#node\n\n\u003c!-- [unist-root]: https://github.com/syntax-tree/unist#root --\u003e\n\n[unist-syntax-tree]: https://github.com/syntax-tree/unist#syntax-tree\n\n\u003c!-- [unist-tree]: https://github.com/syntax-tree/unist#tree --\u003e\n\n[unist-utilities]: https://github.com/syntax-tree/unist#list-of-utilities\n[unist]: https://github.com/syntax-tree/unist\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fesast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflex-development%2Fesast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fesast/lists"}