source: trip-planner-front/node_modules/regjsparser/README.md@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 788 bytes
Line 
1# RegJSParser
2
3Parsing the JavaScript's RegExp in JavaScript.
4
5## Installation
6
7```bash
8npm install regjsparser
9```
10
11## Usage
12
13```js
14var parse = require('regjsparser').parse;
15
16var parseTree = parse('^a'); // /^a/
17console.log(parseTree);
18
19// Toggle on/off additional features:
20var parseTree = parse('^a', '', {
21 // SEE: https://github.com/jviereck/regjsparser/pull/78
22 unicodePropertyEscape: true,
23
24 // SEE: https://github.com/jviereck/regjsparser/pull/83
25 namedGroups: true,
26
27 // SEE: https://github.com/jviereck/regjsparser/pull/89
28 lookbehind: true
29});
30console.log(parseTree);
31```
32
33## Testing
34
35To run the tests, run the following command:
36
37```bash
38npm test
39```
40
41To create a new reference file, execute…
42
43```bash
44node test/update-fixtures.js
45```
46
47…from the repo top directory.
Note: See TracBrowser for help on using the repository browser.