Gathering detailed insights and metrics for @eslint-community/regexpp
Gathering detailed insights and metrics for @eslint-community/regexpp
Gathering detailed insights and metrics for @eslint-community/regexpp
Gathering detailed insights and metrics for @eslint-community/regexpp
The regular expression parser for ECMAScript.
npm install @eslint-community/regexpp
99.6
Supply Chain
100
Quality
86.6
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
24 Stars
123 Commits
5 Forks
4 Watching
8 Branches
7 Contributors
Updated on 23 Nov 2024
Minified
Minified + Gzipped
TypeScript (98.62%)
JavaScript (1.38%)
Cumulative downloads
Total Downloads
Last day
-7.4%
5,770,317
Compared to previous day
Last week
1.7%
33,210,711
Compared to previous week
Last month
10.3%
138,558,904
Compared to previous month
Last year
161.4%
1,270,061,124
Compared to previous year
A regular expression parser for ECMAScript.
1$ npm install @eslint-community/regexpp
1import { 2 AST, 3 RegExpParser, 4 RegExpValidator, 5 RegExpVisitor, 6 parseRegExpLiteral, 7 validateRegExpLiteral, 8 visitRegExpAST 9} from "@eslint-community/regexpp"
Parse a given regular expression literal then make AST object.
This is equivalent to new RegExpParser(options).parseLiteral(source)
.
source
(string | RegExp
) The source code to parse.options?
(RegExpParser.Options
) The options to parse.Validate a given regular expression literal.
This is equivalent to new RegExpValidator(options).validateLiteral(source)
.
source
(string
) The source code to validate.options?
(RegExpValidator.Options
) The options to validate.Visit each node of a given AST.
This is equivalent to new RegExpVisitor(handlers).visit(ast)
.
ast
(AST.Node
) The AST to visit.handlers
(RegExpVisitor.Handlers
) The callbacks.options?
(RegExpParser.Options
) The options to parse.Parse a regular expression literal.
source
(string
) The source code to parse. E.g. "/abc/g"
.start?
(number
) The start index in the source code. Default is 0
.end?
(number
) The end index in the source code. Default is source.length
.Parse a regular expression pattern.
source
(string
) The source code to parse. E.g. "abc"
.start?
(number
) The start index in the source code. Default is 0
.end?
(number
) The end index in the source code. Default is source.length
.flags?
({ unicode?: boolean, unicodeSets?: boolean }
) The flags to enable Unicode mode, and Unicode Set mode.Parse a regular expression flags.
source
(string
) The source code to parse. E.g. "gim"
.start?
(number
) The start index in the source code. Default is 0
.end?
(number
) The end index in the source code. Default is source.length
.options
(RegExpValidator.Options
) The options to validate.Validate a regular expression literal.
source
(string
) The source code to validate.start?
(number
) The start index in the source code. Default is 0
.end?
(number
) The end index in the source code. Default is source.length
.Validate a regular expression pattern.
source
(string
) The source code to validate.start?
(number
) The start index in the source code. Default is 0
.end?
(number
) The end index in the source code. Default is source.length
.flags?
({ unicode?: boolean, unicodeSets?: boolean }
) The flags to enable Unicode mode, and Unicode Set mode.Validate a regular expression flags.
source
(string
) The source code to validate.start?
(number
) The start index in the source code. Default is 0
.end?
(number
) The end index in the source code. Default is source.length
.handlers
(RegExpVisitor.Handlers
) The callbacks.Validate a regular expression literal.
ast
(AST.Node
) The AST to visit.Welcome contributing!
Please use GitHub's Issues/PRs.
npm test
runs tests and measures coverage.npm run build
compiles TypeScript source code to index.js
, index.js.map
, and index.d.ts
.npm run clean
removes the temporary files which are created by npm test
and npm run build
.npm run lint
runs ESLint.npm run update:test
updates test fixtures.npm run update:ids
updates src/unicode/ids.ts
.npm run watch
runs tests with --watch
option.No vulnerabilities found.
No security vulnerabilities found.