Skip to content

Commit c0736d4

Browse files
committed
Remove loose string reference
1 parent 17ce0be commit c0736d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Readme.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ regexp.exec("/bar/baz");
166166

167167
#### Wildcard
168168

169-
A wildcard can also be used. It is roughly equivalent to `(.*)` except when decoding in `match` below it splits on the delimiter.
169+
A wildcard can also be used. It is roughly equivalent to `(.*)`.
170170

171171
```js
172172
const regexp = pathToRegexp("/*");
173-
// keys = [{ name: '0', pattern: '[^\\/]*', modifier: '*' }]
173+
// keys = [{ name: '0', pattern: '[^\\/]*', separator: '/', modifier: '*' }]
174174

175175
regexp.exec("/");
176176
//=> [ '/', '', index: 0 ]
@@ -234,7 +234,7 @@ toPathRegexp({ id: "123" }); //=> "/user/123"
234234

235235
- If you are rewriting paths with match and compiler, consider using `encode: false` and `decode: false` to keep raw paths passed around.
236236
- To ensure matches work on paths containing characters usually encoded, consider using [encodeurl](https://github.com/pillarjs/encodeurl) for `encodePath`.
237-
- If matches are intended to be exact, you need to set `loose: ''`, `trailing: false`, and `sensitive: true`.
237+
- If matches are intended to be exact, you need to set `loose: false`, `trailing: false`, and `sensitive: true`.
238238

239239
### Parse
240240

0 commit comments

Comments
 (0)