{"id":19869742,"url":"https://github.com/decaffeinate/decaffeinate-parser","last_synced_at":"2025-07-16T05:38:17.387Z","repository":{"id":2790455,"uuid":"43342919","full_name":"decaffeinate/decaffeinate-parser","owner":"decaffeinate","description":"A better AST for CoffeeScript, inspired by CoffeeScriptRedux.","archived":false,"fork":false,"pushed_at":"2023-03-03T23:58:52.000Z","size":3155,"stargazers_count":23,"open_issues_count":7,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-02T08:45:41.110Z","etag":null,"topics":["ast","coffeescript","decaffeinate","es2015","parse"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decaffeinate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-09-29T03:36:04.000Z","updated_at":"2023-01-09T18:24:12.000Z","dependencies_parsed_at":"2023-07-06T11:01:28.928Z","dependency_job_id":null,"html_url":"https://github.com/decaffeinate/decaffeinate-parser","commit_stats":{"total_commits":1319,"total_committers":13,"mean_commits":"101.46153846153847","dds":0.5034116755117513,"last_synced_commit":"91a4f995a3aaacfb0f011efb861b69005c0b903e"},"previous_names":[],"tags_count":156,"template":false,"template_full_name":null,"purl":"pkg:github/decaffeinate/decaffeinate-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decaffeinate%2Fdecaffeinate-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decaffeinate%2Fdecaffeinate-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decaffeinate%2Fdecaffeinate-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decaffeinate%2Fdecaffeinate-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decaffeinate","download_url":"https://codeload.github.com/decaffeinate/decaffeinate-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decaffeinate%2Fdecaffeinate-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265485105,"owners_count":23774431,"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","coffeescript","decaffeinate","es2015","parse"],"created_at":"2024-11-12T16:06:47.763Z","updated_at":"2025-07-16T05:38:17.089Z","avatar_url":"https://github.com/decaffeinate.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# decaffeinate-parser [![CI](https://github.com/decaffeinate/decaffeinate-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/decaffeinate/decaffeinate-parser/actions/workflows/ci.yml) [![package version](https://badge.fury.io/js/decaffeinate-parser.svg)](https://badge.fury.io/js/decaffeinate-parser)\n\nThis project uses the [official CoffeeScript\nparser](https://github.com/jashkenas/coffeescript) to parse CoffeeScript source\ncode, then maps the AST generated by the parser to one more suitable for the\n[decaffeinate project](https://github.com/eventualbuddha/decaffeinate) (based on\nthe AST generated by\n[CoffeeScriptRedux](https://github.com/michaelficarra/CoffeeScriptRedux)).\n\nThis project might be useful to anyone who wants to work with a CoffeeScript\nAST and prefers working with a saner AST.\n\n## Install\n\n```bash\n# via yarn\n$ yarn add decaffeinate-parser\n# via npm\n$ npm install decaffeinate-parser\n```\n\n## Usage\n\nThis example gets the names of the parameters in the `add` function:\n\n```js\nimport { parse } from 'decaffeinate-parser';\n\nconst program = parse('add = (a, b) -\u003e a + b');\nconst assignment = program.body.statements[0];\nconst fn = assignment.expression;\n\nconsole.log(fn.parameters.map((param) =\u003e param.data)); // [ 'a', 'b' ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecaffeinate%2Fdecaffeinate-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecaffeinate%2Fdecaffeinate-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecaffeinate%2Fdecaffeinate-parser/lists"}