This repository was archived by the owner on Jun 9, 2025. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork13
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
Capture group name assignment fails with TypeError: Cannot read property 'slice' of null #17
Closed
Description
Hi,
Not sure if you are still maintaining this project, but is seems like a great way to simplify the use of RegExp. Congrats.
I found a problem where I'm running several strings through a match and if nothing matches, result is null which results in an error in the following line:
return Array.prototype.reduce.call(result.slice(1), (result, current, index) => {However I understand this is a workaround implementation for named captures which is now a part of the ECMAScript spec, so not sure if placing a check is the right move or simply to support named matches natively.
Metadata
Metadata
Assignees
Labels
No labels