Skip to content

Commit df53c8e

Browse files
committed
Update start documentation, add option to README
1 parent dbd79fc commit df53c8e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ var pathToRegexp = require('path-to-regexp')
3030
- **options**
3131
- **sensitive** When `true` the regexp will be case sensitive. (default: `false`)
3232
- **strict** When `true` the regexp allows an optional trailing delimiter to match. (default: `false`)
33-
- **end** When `false` the regexp will match the beginning instead of the entire string. (default: `true`)
33+
- **end** When `true` the regexp will match to the end of the string. (default: `true`)
34+
- **start** When `true` the regexp will match from the beginning of the string. (default: `true`)
3435
- Advanced options (use for non-pathname strings, e.g. host names):
3536
- **delimiter** The default delimiter for segments. (default: `'/'`)
3637
- **endsWith** Optional character, or list of characters, to treat as "end" characters.

index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ declare namespace pathToRegexp {
1111
*/
1212
strict?: boolean;
1313
/**
14-
* When `false` the regexp will match the end instead of the entire string. (default: `true`)
14+
* When `true` the regexp will match to the end of the string. (default: `true`)
1515
*/
16-
start?: boolean;
16+
end?: boolean;
1717
/**
18-
* When `false` the regexp will match the beginning instead of the entire string. (default: `true`)
18+
* When `true` the regexp will match from the beginning of the string. (default: `true`)
1919
*/
20-
end?: boolean;
20+
start?: boolean;
2121
/**
2222
* Sets the final character for non-ending optimistic matches. (default: `/`)
2323
*/

0 commit comments

Comments
 (0)