{"_id":"@babel/regjsgen","_rev":"2955809","name":"@babel/regjsgen","description":"Generate regular expressions from regjsparser’s AST.","dist-tags":{"latest":"0.8.0"},"maintainers":[{"name":"existentialism","email":""},{"name":"hzoo","email":""},{"name":"jlhwung","email":""},{"name":"nicolo-ribaudo","email":""}],"time":{"modified":"2023-04-27T04:02:11.000Z","created":"2023-01-25T12:04:29.186Z","0.8.0":"2023-01-25T12:04:29.186Z"},"users":{},"author":{"name":"Benjamin Tan","url":"https://ofcr.se/"},"repository":{"type":"git","url":"git+https://github.com/bnjmnt4n/regjsgen.git"},"versions":{"0.8.0":{"name":"@babel/regjsgen","version":"0.8.0","description":"Generate regular expressions from regjsparser’s AST.","homepage":"https://github.com/bnjmnt4n/regjsgen","main":"regjsgen.js","keywords":["ast","generate","regex","regexp","regular expressions"],"license":"MIT","author":{"name":"Benjamin Tan","url":"https://ofcr.se/"},"repository":{"type":"git","url":"git+https://github.com/bnjmnt4n/regjsgen.git"},"bugs":{"url":"https://github.com/bnjmnt4n/regjsgen/issues"},"scripts":{"test":"node tests/tests.js","coverage":"nyc --reporter=html npm test","report-coverage":"nyc --reporter=lcov npm test && codecov","update-fixtures":"node tests/update-fixtures.js"},"devDependencies":{"codecov":"^3.8.3","nyc":"^15.1.0","regjsparser":"^0.9.1","request":"^2.88.2"},"publishConfig":{"access":"public"},"gitHead":"ba48054a77d8b59bc85d7dc9b644a244490c182f","_id":"@babel/regjsgen@0.8.0","_nodeVersion":"19.4.0","_npmVersion":"9.2.0","dist":{"shasum":"f0ba69b075e1f05fb2825b7fad991e7adbb18310","size":4885,"noattachment":false,"key":"/@babel/regjsgen/-/@babel/regjsgen-0.8.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@babel/regjsgen/download/@babel/regjsgen-0.8.0.tgz"},"_npmUser":{"name":"nicolo-ribaudo","email":"nicolo.ribaudo@gmail.com"},"directories":{},"maintainers":[{"name":"existentialism","email":""},{"name":"hzoo","email":""},{"name":"jlhwung","email":""},{"name":"nicolo-ribaudo","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/regjsgen_0.8.0_1674648268986_0.7485290996723482"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-25T12:04:29.186Z","publish_time":1674648269186,"_cnpm_publish_time":1674648269186}},"readme":"# regjsgen [![Build status][ci-img]][ci] [![Code coverage status][codecov-img]][codecov]\n\n> 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> - [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 in Node.js 10, 12, 14, and 16.<br>\nCompatible with regjsparser v0.7.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/master/graph/badge.svg\n[regjsparser]: https://github.com/jviereck/regjsparser\n","_attachments":{},"homepage":"https://github.com/bnjmnt4n/regjsgen","bugs":{"url":"https://github.com/bnjmnt4n/regjsgen/issues"},"license":"MIT"}