{"_id":"@babel/regjsgen","maintainers":[{"name":"hzoo","email":"hi@henryzoo.com"},{"name":"existentialism","email":"bng412@gmail.com"},{"name":"nicolo-ribaudo","email":"nicolo.ribaudo@gmail.com"},{"name":"jlhwung","email":"i@jhuang.me"}],"keywords":["ast","generate","regex","regexp","regular expressions"],"dist-tags":{"latest":"0.8.0"},"author":{"name":"Benjamin Tan","url":"https://ofcr.se/"},"description":"Generate regular expressions from regjsparser’s AST.","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","repository":{"type":"git","url":"git+https://github.com/bnjmnt4n/regjsgen.git"},"bugs":{"url":"https://github.com/bnjmnt4n/regjsgen/issues"},"license":"MIT","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":{"integrity":"sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==","shasum":"f0ba69b075e1f05fb2825b7fad991e7adbb18310","tarball":"https://nexus.nspop.dk/nexus/repository/nsp-npm/@babel/regjsgen/-/regjsgen-0.8.0.tgz","fileCount":4,"unpackedSize":15413,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkT9zSYXqyFzOUexern+JEbG034gJe1+/QahcrKwZnvQIgc7LpSiK23ZTj3qxnHj5CJbfGJ/7FQXuJJr2Po6Aw1Kg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0RrNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMHQ//XS3akS9TaeiVI7oiI15SApxs1nuEUHRDXCdorkwq/fkOJPaD\r\nY1rLVQyxQFW051H248hW5Qj8tziZ100NnhfipqU0bmIPgqZp3y9ozfddsqsP\r\nFoxB+YRQmRHp0/EfQHAJo2nWxgQ0Kx6PjuVB+ifxyrRSgRdN2TdTGFMz3GvG\r\n/4oc8M4kkWmiFY8yZMNiGxW+DsHlJ/ERuKznBP5BBmSp2Ei4OdmVVG8tLQ+l\r\neplg3xtgT99pNJRmy7PsEgT9J+CQepkjd9DoB/CFH2Vub/GSwJrz4J5gHMUv\r\n4DRE3Dj5uz2sskQXHc6uoT13p+neLAxn1tYi+6eyDLNZ3BZkKGm/DYOZ7yZM\r\nuZiJrPaN9tevA2gqVLwwIwIljSZRIQbb/iljmU40pHJ5dmzXlmUABwKfLS9U\r\nraANx1bQbxYX7sCmjH4q4pR6xyrA5CwZ9qTmTxanhnDXYqHJyGcv6t3ZvLDW\r\nhJ+ju2gWV13cgosOPg5bFNqUtRebZsQBsYNTB6veVYkDGBx8y/MKmyC6UMBB\r\n81gugrOx9obRjsmQGoQ2G4u9zhlK/y1mwAss0JJMqd42/TQZdnu4AQ1sgzvw\r\nICQN6UV2hcHwFrO4+7KM5rHMzF9kijKNy5aU78Du7WJhQROUjva7PDy4Yb3H\r\nZDP6IkOnuvLrErzItIvJBPul+8sR5H63hs4=\r\n=Oaj0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nicolo-ribaudo","email":"nicolo.ribaudo@gmail.com"},"directories":{},"maintainers":[{"name":"hzoo","email":"hi@henryzoo.com"},{"name":"existentialism","email":"bng412@gmail.com"},{"name":"nicolo-ribaudo","email":"nicolo.ribaudo@gmail.com"},{"name":"jlhwung","email":"i@jhuang.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/regjsgen_0.8.0_1674648268986_0.7485290996723482"},"_hasShrinkwrap":false}},"name":"@babel/regjsgen","time":{"created":"2023-01-25T12:04:28.869Z","0.8.0":"2023-01-25T12:04:29.186Z","modified":"2025-05-07T17:41:43.442Z"},"readmeFilename":"README.md","homepage":"https://github.com/bnjmnt4n/regjsgen"}