regjsparser (0.12.0)

Published 2026-02-24 14:04:15 +00:00 by atheaadmin

Installation

registry=
npm install regjsparser@0.12.0
"regjsparser": "0.12.0"

About this package

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.

Dependencies

Dependencies

ID Version
jsesc ~3.0.2

Development Dependencies

ID Version
@unicode/unicode-16.0.0 ^1.6.0
eslint ^9.10.0
eslint-plugin-regexp ^2.6.0
globals ^15.9.0
npm-run-all ^4.1.5
regenerate ~1.0.1
regjsparser ^0.11.2
tinybench ^2.9.0
typescript ^4.5.2
Details
npm
2026-02-24 14:04:15 +00:00
0
'Julian Viereck'
BSD-2-Clause
latest
20 KiB
Assets (1)
Versions (1) View all
0.12.0 2026-02-24