Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a43e545

Browse files
Move delimiter option to each method
1 parent c909d1f commit a43e545

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎Readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ The `match` function returns a function for matching strings against a path:
6868
- **options** _(optional)_ (See [parse](#parse) for more options)
6969
- **sensitive** Regexp will be case sensitive. (default: `false`)
7070
- **end** Validate the match reaches the end of the string. (default: `true`)
71+
- **delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` parameters. (default: `'/'`)
7172
- **trailing** Allows optional trailing delimiter to match. (default: `true`)
7273
- **decode** Function for decoding strings to params, or `false` to disable all processing. (default: `decodeURIComponent`)
7374

@@ -83,6 +84,7 @@ The `compile` function will return a function for transforming parameters into a
8384

8485
- **path** A string.
8586
- **options** (See [parse](#parse) for more options)
87+
- **delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` parameters. (default: `'/'`)
8688
- **encode** Function for encoding input strings for output into the path, or `false` to disable entirely. (default: `encodeURIComponent`)
8789

8890
```js
@@ -113,7 +115,6 @@ The `parse` function accepts a string and returns `TokenData`, the set of tokens
113115

114116
- **path** A string.
115117
- **options** _(optional)_
116-
- **delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` parameters. (default: `'/'`)
117118
- **encodePath** A function for encoding input strings. (default: `x => x`, recommended: [`encodeurl`](https://github.com/pillarjs/encodeurl))
118119

119120
### Tokens

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /