Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 28, 2024 via pnpm
Package summary
Share
0
issues
1
license
1
MIT
Package created
28 Nov 2022
Version published
25 Oct 2023
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
@eslint-community/regexpp@4.10.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of @eslint-community/regexpp 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does @eslint-community/regexpp do?

The @eslint-community/regexpp is a highly efficient tool designed for parsing regular expressions in ECMAScript. This module enables developers to carry out tasks like parsing, validating, and visiting each node of a regular expression's Abstract Syntax Tree (AST).

How do you use @eslint-community/regexpp?

The usage of @eslint-community/regexpp involves a series of straightforward steps. First and foremost, you need to install the npm package using the command:

$ npm install @eslint-community/regexpp

Afterwards, import the necessary components such as AST, RegExpParser, RegExpValidator, RegExpVisitor, parseRegExpLiteral, validateRegExpLiteral, and visitRegExpAST.

import {
    AST,
    RegExpParser,
    RegExpValidator,
    RegExpVisitor,
    parseRegExpLiteral,
    validateRegExpLiteral,
    visitRegExpAST
} from "@eslint-community/regexpp";

Now you can use these components to parse, validate and visit regex nodes. Here's how you would parse a literal:

const literal = "/abc/g";
const parsedLiteral = parseRegExpLiteral(literal);

To validate a literal, you'd do something like this:

const isValid = validateRegExpLiteral(literal);

And to visit each node in a regex's AST, you'd do:

visitRegExpAST(parsedLiteral, {
    onQuantifierEnter(node) {
        console.log(`Visiting a quantifier: ${node.raw}`);
    }
});

Where are the @eslint-community/regexpp docs?

For thorough understanding and better utilization of this package's capabilities, it is recommended that you refer to detailed documentation. Detailed documentation about @eslint-community/regexpp can be found directly on the official repository at https://github.com/eslint-community/regexpp. Instructions for installation, usage, and comprehensive API references are all provided in the repository's README file.