Hello and thanks for this package. When the original path ends with an end-slash (ex '/about/') the returned regexp ends with both a required and an optional end-slash; I believe, instead, it should end with only one end-slash; optional or required.
Instead of this,
pathToRegexp('/about/').regexp // /^(?:\/about\/)(?:\/$)?$/i
One of these would be better,
pathToRegexp('/about/').regexp // /^(?:\/about)(?:\/$)?$/i
pathToRegexp('/about/').regexp // /^(?:\/about\/)$/i
Hello and thanks for this package. When the original path ends with an end-slash (ex '/about/') the returned regexp ends with both a required and an optional end-slash; I believe, instead, it should end with only one end-slash; optional or required.
Instead of this,
One of these would be better,