Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis.Learn more
Socket
Socket

regjsparser

Package Overview
Dependencies
1
Maintainers
1
Versions
33
Issues
File Explorer

Advanced tools

regjsparser

Parsing the JavaScript's RegExp in JavaScript.

    0.10.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
22,709,923
increased by5.61%

Weekly downloads

Readme

Source

RegJSParser

Parsing the JavaScript's RegExp in JavaScript.

Installation

npm install regjsparser

Usage

var parse = require('regjsparser').parse; var parseTree = parse('^a'); // /^a/ console.log(parseTree); // Toggle on/off additional features: var parseTree = parse('^a', '', { // SEE: https://github.com/jviereck/regjsparser/pull/78 unicodePropertyEscape: true, // SEE: https://github.com/jviereck/regjsparser/pull/83 namedGroups: true, // SEE: https://github.com/jviereck/regjsparser/pull/89 lookbehind: true }); console.log(parseTree);

Testing

To run the tests, run the following command:

npm test

To create a new reference file, execute…

node test/update-fixtures.js

…from the repo top directory.

FAQs

Last updated on 13 Mar 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
Socket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc