You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Readme.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -32,12 +32,12 @@ The `pathToRegexp` function returns a regular expression with `keys` as a proper
32
32
-**path** A string.
33
33
-**options**_(optional)_
34
34
-**sensitive** Regexp will be case sensitive. (default: `false`)
35
-
-**trailing**Regexp allows an optional trailing delimiter to match. (default: `true`)
35
+
-**trailing**Allows optional trailing delimiter to match. (default: `true`)
36
36
-**end** Match to the end of the string. (default: `true`)
37
37
-**start** Match from the beginning of the string. (default: `true`)
38
-
-**loose** Allow the delimiter to be repeated an arbitrary number of times. (default: `true`)
38
+
-**loose** Allow the delimiter to be arbitrarily repeated, e.g. `/` or `///`. (default: `true`)
39
39
-**delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` parameters. (default: `'/'`)
40
-
-**encodePath** A function to encode strings before inserting into `RegExp`. (default: `x => x`, recommended: [`encodeurl`](https://github.com/pillarjs/encodeurl))
40
+
-**encodePath** A function for encoding input strings. (default: `x => x`, recommended: [`encodeurl`](https://github.com/pillarjs/encodeurl) for unicode encoding)
- If you are rewriting paths with match and compiler, consider using `encode: false` and `decode: false` to keep raw paths passed around.
248
248
- To ensure matches work on paths containing characters usually encoded, consider using [encodeurl](https://github.com/pillarjs/encodeurl) for `encodePath`.
249
249
- If matches are intended to be exact, you need to set `loose: false`, `trailing: false`, and `sensitive: true`.
0 commit comments