{"_id":"vscode-regexpp","_rev":"1-b52e6f3a34d81be26acccbb03087e638","name":"vscode-regexpp","dist-tags":{"latest":"3.1.0"},"versions":{"3.1.0":{"name":"vscode-regexpp","version":"3.1.0","description":"Regular expression parser for ECMAScript.","engines":{"node":">=8"},"main":"index","dependencies":{},"devDependencies":{"@mysticatea/eslint-plugin":"^11.0.0","@types/eslint":"^4.16.2","@types/jsdom":"^12.2.4","@types/mocha":"^5.2.2","@types/node":"^12.6.8","codecov":"^3.5.0","dts-bundle":"^0.7.3","eslint":"^6.1.0","jsdom":"^15.1.1","mocha":"^6.2.0","npm-run-all":"^4.1.5","nyc":"^14.1.1","rimraf":"^2.6.2","rollup":"^1.17.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-sourcemaps":"^0.4.2","ts-node":"^8.3.0","typescript":"^3.5.3"},"scripts":{"prebuild":"npm run -s clean","prepack":"run-s clean build","build":"run-s build:*","build:tsc":"tsc --module es2015","build:rollup":"rollup -c","build:dts":"dts-bundle --name vscode-regexpp --main .temp/index.d.ts --out ../index.d.ts","clean":"rimraf .temp index.*","codecov":"nyc report -r lcovonly && codecov -t ${CODECOV_TOKEN} --disable=gcov","lint":"eslint scripts src test --ext .ts","pretest":"run-s build lint","test":"nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000","update:test":"ts-node scripts/update-fixtures.ts","update:unicode":"run-s update:unicode:*","update:unicode:ids":"ts-node scripts/update-unicode-ids.ts","update:unicode:props":"ts-node scripts/update-unicode-properties.ts","preversion":"npm test","version":"npm run -s build","postversion":"git push && git push --tags","prewatch":"npm run -s clean","watch":"_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl"},"repository":{"type":"git","url":"git+https://github.com/mysticatea/regexpp.git"},"keywords":["regexp","regular","expression","parser","validator","ast","abstract","syntax","tree","ecmascript","es2015","es2016","es2017","es2018","es2019","es2020","annexB"],"author":{"name":"Toru Nagashima","url":"https://github.com/mysticatea"},"license":"MIT","bugs":{"url":"https://github.com/mysticatea/regexpp/issues"},"homepage":"https://github.com/mysticatea/regexpp#readme","funding":"https://github.com/sponsors/mysticatea","gitHead":"59c6dba031e67131e9301a59a39162bb6a857b26","_id":"vscode-regexpp@3.1.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg==","shasum":"42d059b6fffe99bd42939c0d013f632f0cad823f","tarball":"https://registry.npmjs.org/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz","fileCount":8,"unpackedSize":308669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrw9VCRA9TVsSAnZWagAAoWsQAIHrU/plCMi3DmroB4L+\nJnp5bpJdv+HUE1KU6LikSVkcIQoviEx5JzhNyBs+wLl244UbRjKv04QqZ0l6\nAb2+C6wzxWtRcxPy36/7XCZJKCtri16dFExOTc4Cu9HtOyw+78MGeVQN5Tsj\n0kOSHTE3UqUSkDfjJObMRuaq4rppEkSfQ5e3K5a0SwmajJYWTSQjw6EYoUXd\nx2SRpNxA0XsKOs4kqnnmIGxTu/N2RfjZLWip5qtBhpg8805ZnuWNJaLVnf1h\n/GW1i9WshcoSof2s15rLFSncWK3Df4KpzFud4rSTC8u7KekvycuYEBhVoeCO\nbLUUNDJTpzUjVK91dgMeArfULvwNA+mgqJFMszxtvZzHKyVs5S/B91/aJbsk\nzejWGbh2zufdBXhrj4GjawXXchtBnnpMwyRYIqkkjdSbtAfg6xJONCRdMCfl\nMUVl+n0GQ6cWH9Nzfy8ZfbU5fIZaTejTyqpSNOMW+iI1SoRlxl8SMdTBtl6O\nZIEbMJfrGomXlFruy84jq42htLHBAfI7/BpmBcIHc8giltWLObzFh3m3MsZY\nlxCATnTDy+TsN/OWNqdaecprlvAbxlxqKXTILfd4NPeV0NTApZFDoIqZL30c\nil5SDAUSGwAY7QWiYJIOnKqUvGwKCVAywvAB1MrIanlkRrorwQMiQpw8t4ig\nb0LA\r\n=UlXN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6Dz8jOf6A9xKz4WsVPVPeOYefjpO90uiEhKFJN8ykKwIhALSxJZyTYAlFyHOsDRqcPMtN6CBL+nab7jzWdydzgx+x"}]},"_npmUser":{"name":"connor.peet","email":"connor@peet.io"},"directories":{},"maintainers":[{"name":"connor.peet","email":"connor@peet.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vscode-regexpp_3.1.0_1605308244665_0.5534128533927694"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-13T22:57:24.665Z","3.1.0":"2020-11-13T22:57:24.876Z","modified":"2022-05-23T11:06:07.093Z"},"maintainers":[{"name":"connor.peet","email":"connor@peet.io"}],"description":"Regular expression parser for ECMAScript.","homepage":"https://github.com/mysticatea/regexpp#readme","keywords":["regexp","regular","expression","parser","validator","ast","abstract","syntax","tree","ecmascript","es2015","es2016","es2017","es2018","es2019","es2020","annexB"],"repository":{"type":"git","url":"git+https://github.com/mysticatea/regexpp.git"},"author":{"name":"Toru Nagashima","url":"https://github.com/mysticatea"},"bugs":{"url":"https://github.com/mysticatea/regexpp/issues"},"license":"MIT","readme":"# regexpp\n\n[![npm version](https://img.shields.io/npm/v/regexpp.svg)](https://www.npmjs.com/package/regexpp)\n[![Downloads/month](https://img.shields.io/npm/dm/regexpp.svg)](http://www.npmtrends.com/regexpp)\n[![Build Status](https://github.com/mysticatea/regexpp/workflows/CI/badge.svg)](https://github.com/mysticatea/regexpp/actions)\n[![codecov](https://codecov.io/gh/mysticatea/regexpp/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/regexpp)\n[![Dependency Status](https://david-dm.org/mysticatea/regexpp.svg)](https://david-dm.org/mysticatea/regexpp)\n\nA regular expression parser for ECMAScript.\n\n## 💿 Installation\n\n```bash\n$ npm install regexpp\n```\n\n- require Node.js 8 or newer.\n\n## 📖 Usage\n\n```ts\nimport {\n    AST,\n    RegExpParser,\n    RegExpValidator,\n    RegExpVisitor,\n    parseRegExpLiteral,\n    validateRegExpLiteral,\n    visitRegExpAST\n} from \"regexpp\"\n```\n\n### parseRegExpLiteral(source, options?)\n\nParse a given regular expression literal then make AST object.\n\nThis is equivalent to `new RegExpParser(options).parseLiteral(source)`.\n\n- **Parameters:**\n    - `source` (`string | RegExp`) The source code to parse.\n    - `options?` ([`RegExpParser.Options`]) The options to parse.\n- **Return:**\n    - The AST of the regular expression.\n\n### validateRegExpLiteral(source, options?)\n\nValidate a given regular expression literal.\n\nThis is equivalent to `new RegExpValidator(options).validateLiteral(source)`.\n\n- **Parameters:**\n    - `source` (`string`) The source code to validate.\n    - `options?` ([`RegExpValidator.Options`]) The options to validate.\n\n### visitRegExpAST(ast, handlers)\n\nVisit each node of a given AST.\n\nThis is equivalent to `new RegExpVisitor(handlers).visit(ast)`.\n\n- **Parameters:**\n    - `ast` ([`AST.Node`]) The AST to visit.\n    - `handlers` ([`RegExpVisitor.Handlers`]) The callbacks.\n\n### RegExpParser\n\n#### new RegExpParser(options?)\n\n- **Parameters:**\n    - `options?` ([`RegExpParser.Options`]) The options to parse.\n\n#### parser.parseLiteral(source, start?, end?)\n\nParse a regular expression literal.\n\n- **Parameters:**\n    - `source` (`string`) The source code to parse. E.g. `\"/abc/g\"`.\n    - `start?` (`number`) The start index in the source code. Default is `0`.\n    - `end?` (`number`) The end index in the source code. Default is `source.length`.\n- **Return:**\n    - The AST of the regular expression.\n\n#### parser.parsePattern(source, start?, end?, uFlag?)\n\nParse a regular expression pattern.\n\n- **Parameters:**\n    - `source` (`string`) The source code to parse. E.g. `\"abc\"`.\n    - `start?` (`number`) The start index in the source code. Default is `0`.\n    - `end?` (`number`) The end index in the source code. Default is `source.length`.\n    - `uFlag?` (`boolean`) The flag to enable Unicode mode.\n- **Return:**\n    - The AST of the regular expression pattern.\n\n#### parser.parseFlags(source, start?, end?)\n\nParse a regular expression flags.\n\n- **Parameters:**\n    - `source` (`string`) The source code to parse. E.g. `\"gim\"`.\n    - `start?` (`number`) The start index in the source code. Default is `0`.\n    - `end?` (`number`) The end index in the source code. Default is `source.length`.\n- **Return:**\n    - The AST of the regular expression flags.\n\n### RegExpValidator\n\n#### new RegExpValidator(options)\n\n- **Parameters:**\n    - `options` ([`RegExpValidator.Options`]) The options to validate.\n\n#### validator.validateLiteral(source, start, end)\n\nValidate a regular expression literal.\n\n- **Parameters:**\n    - `source` (`string`) The source code to validate.\n    - `start?` (`number`) The start index in the source code. Default is `0`.\n    - `end?` (`number`) The end index in the source code. Default is `source.length`.\n\n#### validator.validatePattern(source, start, end, uFlag)\n\nValidate a regular expression pattern.\n\n- **Parameters:**\n    - `source` (`string`) The source code to validate.\n    - `start?` (`number`) The start index in the source code. Default is `0`.\n    - `end?` (`number`) The end index in the source code. Default is `source.length`.\n    - `uFlag?` (`boolean`) The flag to enable Unicode mode.\n\n#### validator.validateFlags(source, start, end)\n\nValidate a regular expression flags.\n\n- **Parameters:**\n    - `source` (`string`) The source code to validate.\n    - `start?` (`number`) The start index in the source code. Default is `0`.\n    - `end?` (`number`) The end index in the source code. Default is `source.length`.\n\n### RegExpVisitor\n\n#### new RegExpVisitor(handlers)\n\n- **Parameters:**\n    - `handlers` ([`RegExpVisitor.Handlers`]) The callbacks.\n\n#### visitor.visit(ast)\n\nValidate a regular expression literal.\n\n- **Parameters:**\n    - `ast` ([`AST.Node`]) The AST to visit.\n\n## 📰 Changelog\n\n- [GitHub Releases](https://github.com/mysticatea/regexpp/releases)\n\n## 🍻 Contributing\n\nWelcome contributing!\n\nPlease use GitHub's Issues/PRs.\n\n### Development Tools\n\n- `npm test` runs tests and measures coverage.\n- `npm run build` compiles TypeScript source code to `index.js`, `index.js.map`, and `index.d.ts`.\n- `npm run clean` removes the temporary files which are created by `npm test` and `npm run build`.\n- `npm run lint` runs ESLint.\n- `npm run update:test` updates test fixtures.\n- `npm run update:ids` updates `src/unicode/ids.ts`.\n- `npm run watch` runs tests with `--watch` option.\n\n[`AST.Node`]: src/ast.ts#L4\n[`RegExpParser.Options`]: src/parser.ts#L539\n[`RegExpValidator.Options`]: src/validator.ts#L127\n[`RegExpVisitor.Handlers`]: src/visitor.ts#L204\n","readmeFilename":"README.md"}