{"id":15207059,"url":"https://github.com/babel/regjsgen","last_synced_at":"2025-10-02T23:35:41.410Z","repository":{"id":65983471,"uuid":"593153097","full_name":"babel/regjsgen","owner":"babel","description":"Generate regular expressions from regjsparser’s AST.","archived":false,"fork":true,"pushed_at":"2024-09-13T14:17:16.000Z","size":936,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"fork","last_synced_at":"2024-10-30T02:32:01.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/regjsgen","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bnjmnt4n/regjsgen","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-MIT.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["babel"],"open_collective":"babel","custom":"https://gitcoin.co/grants/2906/babel-compiler-for-next-generation-javascript"}},"created_at":"2023-01-25T11:12:40.000Z","updated_at":"2024-09-13T14:17:21.000Z","dependencies_parsed_at":"2023-02-19T19:30:26.405Z","dependency_job_id":null,"html_url":"https://github.com/babel/regjsgen","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babel%2Fregjsgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babel%2Fregjsgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babel%2Fregjsgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babel%2Fregjsgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babel","download_url":"https://codeload.github.com/babel/regjsgen/tar.gz/refs/heads/fork","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235051552,"owners_count":18928184,"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-09-28T06:20:48.389Z","updated_at":"2025-10-02T23:35:36.123Z","avatar_url":"https://github.com/babel.png","language":"JavaScript","funding_links":["https://github.com/sponsors/babel","https://opencollective.com/babel","https://gitcoin.co/grants/2906/babel-compiler-for-next-generation-javascript"],"categories":[],"sub_categories":[],"readme":"# regjsgen [![Build status][ci-img]][ci] [![Code coverage status][codecov-img]][codecov]\n\n\u003e This is a fork of [bnjmnt4n/regjsgen](https://github.com/bnjmnt4n/regjsgen) with some additional patches. The end goal is to merge these patches upstream.\n\u003e - [be866435](https://github.com/babel/regjsgen/commit/be86643508658c70ccb5bec8bc4e3dc2479cac62) _feat: support modifiers proposal_ ([bnjmnt4n/regjsgen#28](https://github.com/bnjmnt4n/regjsgen/pull/28))\n\nGenerate regular expressions from [regjsparser][regjsparser]’s AST.\n\n## Installation\n\n```sh\nnpm i regjsgen\n```\n\n## API\n\n### `regjsgen.generate(ast)`\n\nThis function accepts an abstract syntax tree representing a regular expression (see [regjsparser][regjsparser]), and returns the generated regular expression string.\n\n```js\nconst regjsparser = require('regjsparser');\nconst regjsgen = require('regjsgen');\n\n// Generate an AST with `regjsparser`.\nlet ast = regjsparser.parse(regex);\n\n// Modify AST\n// …\n\n// Generate `RegExp` string with `regjsgen`.\nlet regex = regjsgen.generate(ast);\n```\n\n## Support\n\nTested on Node.js 16 and 18.\u003cbr\u003e\nCompatible with regjsparser v0.10.0’s AST.\n\n\n[ci]: https://github.com/bnjmnt4n/regjsgen/actions\n[ci-img]: https://github.com/bnjmnt4n/regjsgen/workflows/Node.js%20CI/badge.svg\n[codecov]: https://codecov.io/gh/bnjmnt4n/regjsgen\n[codecov-img]: https://codecov.io/gh/bnjmnt4n/regjsgen/branch/main/graph/badge.svg\n[regjsparser]: https://github.com/jviereck/regjsparser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabel%2Fregjsgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabel%2Fregjsgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabel%2Fregjsgen/lists"}