path-to-regexp
Advanced tools
Changelog
2.3.0 / 2018-08-20
delimiter
when processing repeated matching groups (e.g. foo/bar
has no prefix, but has a delimiter)Changelog
2.2.1 / 2018-04-24
end: false
to match both relative and absolute pathsChangelog
2.2.0 / 2018-03-06
token
as second argument to encode
option (e.g. encode(value, token)
)Changelog
2.1.0 / 2017-10-20
/foo/
before required either /foo/
or /foo//
to match in non-ending modeChangelog
2.0.0 / 2017-08-23
endsWith
to match paths like /test?query=string
up to the query stringdelimiters
for specific characters to be treated as parameter prefixes (e.g. /:test
)isarray
dependency/test/
is now treated as /test/
instead of /test
when matching)keys
argument that accepted options
keys
list attached to the RegExp
outputtokensToFunction
(e.g. compile
) to accept an encode
function for pretty encoding (e.g. pass your own implementation)Changelog
1.7.0 / 2016-11-08
delimiter
option to be passed in with tokensToRegExp
which will be used for "non-ending" token match situationsChangelog
1.6.0 / 2016-10-03
RegExp.keys
when using the tokensToRegExp
method (making it consistent with the main export)delimiter
option to be passed in with parse
Keys
and Options
updatedChangelog
1.5.3 / 2016-06-15
\\
to the ignore character group to avoid backtracking on mismatched parensChangelog
1.5.2 / 2016-06-15
\\
in string segments of regexp