+3
-3
README.md
+3
-3
README.md
···
164
164
Let's extend our original example;
165
165
166
166
```js
167
-
import match from 'reghex';
167
+
import { match } from 'reghex';
168
168
169
169
const name = match('name')`
170
170
${/\w+/}
···
203
203
function that returns our root matcher:
204
204
205
205
```js
206
-
import match from 'reghex';
206
+
import { match } from 'reghex';
207
207
208
208
const value = match('value')`
209
209
(${/\w+/} | ${() => root})+
···
341
341
matched, which would cause other matchers to treat it like a mismatch!
342
342
343
343
```js
344
-
import match, { parse } from 'reghex';
344
+
import { match, parse } from 'reghex';
345
345
346
346
const name = match('name')((x) => {
347
347
return x[0] !== 'tim' ? x : undefined;