Add back `keys` property to regex
See issue #236
The returned regex object from pathToRegex used to include the modified
keys array as a keys property in v1.7.0. The current API is not entirely
ideal, since a keys array must be passed, we could instead use a more
functional API without mutation.
In the future this should be changed that no array needs to be passed to pathToRegex,
adding it as a property this way is done to maintain backwards compatibility.
We'll also need a simple couple of tests to ensure we don't regress but otherwise LGTM 😄
Codecov Report
Merging #272 (845c7fb) into master (762bc6b) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## master #272 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 246 250 +4
Branches 98 98
=========================================
+ Hits 246 250 +4
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/index.ts | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 762bc6b...845c7fb. Read the comment docs.