Skip to content

Commit

Permalink
Keep wildcard replacement api
Browse files Browse the repository at this point in the history
  • Loading branch information
kapouer committed Mar 8, 2022
1 parent 3bc12ae commit 6b1b4b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function rewrite(src, dst) {
let re, map;

if (dst) {
if (typeof src == "string") src = src.replace(/\*/g, '(.*)');
re = pathToRegexp(src, keys);
map = toMap(keys);
debug('rewrite %s -> %s %s', src, dst, re);
Expand Down

0 comments on commit 6b1b4b5

Please sign in to comment.