{"id":13760019,"url":"https://github.com/ariya/esprima","last_synced_at":"2025-05-10T10:31:20.850Z","repository":{"id":26965381,"uuid":"30428679","full_name":"ariya/esprima","owner":"ariya","description":"ECMAScript parsing infrastructure for multipurpose analysis","archived":false,"fork":true,"pushed_at":"2021-06-14T02:36:18.000Z","size":58363,"stargazers_count":409,"open_issues_count":0,"forks_count":33,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-05-01T11:05:47.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://esprima.org","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jquery/esprima","license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ariya.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.BSD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-06T19:17:29.000Z","updated_at":"2025-03-26T05:13:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ariya/esprima","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariya%2Fesprima","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariya%2Fesprima/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariya%2Fesprima/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariya%2Fesprima/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ariya","download_url":"https://codeload.github.com/ariya/esprima/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253401142,"owners_count":21902614,"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":[],"created_at":"2024-08-03T13:01:02.260Z","updated_at":"2025-05-10T10:31:16.654Z","avatar_url":"https://github.com/ariya.png","language":"TypeScript","readme":"[![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima)\n[![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima)\n[![Tests](https://github.com/jquery/esprima/workflows/Tests/badge.svg)](https://github.com/jquery/esprima/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima)\n\n**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance,\nstandard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\nparser written in ECMAScript (also popularly known as\n[JavaScript](https://en.wikipedia.org/wiki/JavaScript)).\nEsprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat),\nwith the help of [many contributors](https://github.com/jquery/esprima/contributors).\n\n### Features\n\n- Full support for ECMAScript 2019 ([ECMA-262 10th Edition](http://www.ecma-international.org/publications/standards/Ecma-262.htm))\n- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/es5.md) as standardized by [ESTree project](https://github.com/estree/estree)\n- Experimental support for [JSX](https://facebook.github.io/jsx/), a syntax extension for [React](https://facebook.github.io/react/)\n- Optional tracking of syntax node location (index-based and line-column)\n- [Heavily tested](http://esprima.org/test/ci.html) (~1600 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima))\n\n### API\n\nEsprima can be used to perform [lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis) (tokenization) or [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program.\n\nA simple example on Node.js REPL:\n\n```javascript\n\u003e var esprima = require('esprima');\n\u003e var program = 'const answer = 42';\n\n\u003e esprima.tokenize(program);\n[ { type: 'Keyword', value: 'const' },\n  { type: 'Identifier', value: 'answer' },\n  { type: 'Punctuator', value: '=' },\n  { type: 'Numeric', value: '42' } ]\n  \n\u003e esprima.parseScript(program);\n{ type: 'Program',\n  body:\n   [ { type: 'VariableDeclaration',\n       declarations: [Object],\n       kind: 'const' } ],\n  sourceType: 'script' }\n```\n\nFor more information, please read the [complete documentation](http://esprima.org/doc).\n","funding_links":[],"categories":["Editors","others","Editors [🔝](#readme)","编辑器"],"sub_categories":["Runner","运行器","运行器e2e测试"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fariya%2Fesprima","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fariya%2Fesprima","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fariya%2Fesprima/lists"}