Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

regjsgen

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

regjsgen

Generate regular expressions from regjsparser’s AST.

    0.7.1latest

Version published
Maintainers
1
Weekly downloads
20,024,383
decreased by-0.87%

Weekly downloads

Changelog

Source

v0.7.1

  • Fix printing of quantifiers after \p{...} (#23)

Readme

Source

regjsgen Build status Code coverage status

Generate regular expressions from regjsparser’s AST.

Installation

npm i regjsgen

API

regjsgen.generate(ast)

This function accepts an abstract syntax tree representing a regular expression (see regjsparser), and returns the generated regular expression string.

const regjsparser = require('regjsparser'); const regjsgen = require('regjsgen'); // Generate an AST with `regjsparser`. let ast = regjsparser.parse(regex); // Modify AST // … // Generate `RegExp` string with `regjsgen`. let regex = regjsgen.generate(ast);

Support

Tested in Node.js 10, 12, 14, and 16.
Compatible with regjsparser v0.7.0’s AST.

Keywords

FAQs

What is regjsgen?

Generate regular expressions from regjsparser’s AST.

Is regjsgen popular?

The npm package regjsgen receives a total of 19,159,707 weekly downloads. As such, regjsgen popularity was classified as popular.

Is regjsgen well maintained?

We found that regjsgen demonstrated a healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 17 Jan 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc