From 9a42c3d48f391ca06716af264aea2c57abf9d8ab Mon Sep 17 00:00:00 2001 From: Jan Potoms <2109932+Janpot@users.noreply.github.com> Date: Wed, 8 Jul 2020 08:45:41 +0200 Subject: [PATCH 1/2] strict means it won't allow a trailing slash to match If I understand correctly... --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 8b41ac4..b311b4f 100644 --- a/Readme.md +++ b/Readme.md @@ -30,7 +30,7 @@ const { pathToRegexp, match, parse, compile } = require("path-to-regexp"); - **keys** An array to populate with keys found in the path. - **options** - **sensitive** When `true` the regexp will be case sensitive. (default: `false`) - - **strict** When `true` the regexp allows an optional trailing delimiter to match. (default: `false`) + - **strict** When `true` the regexp won't allow an optional trailing delimiter to match. (default: `false`) - **end** When `true` the regexp will match to the end of the string. (default: `true`) - **start** When `true` the regexp will match from the beginning of the string. (default: `true`) - **delimiter** The default delimiter for segments, e.g. `[^/#?]` for `:named` patterns. (default: `'/#?'`) From 06812d849d1ffed161b3296bd31f6cb6c7d88de7 Mon Sep 17 00:00:00 2001 From: Jan Potoms <2109932+Janpot@users.noreply.github.com> Date: Wed, 8 Jul 2020 20:58:35 +0200 Subject: [PATCH 2/2] Update index.ts --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 95c2c7a..0b317a3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -500,7 +500,7 @@ export interface TokensToRegexpOptions { */ sensitive?: boolean; /** - * When `true` the regexp allows an optional trailing delimiter to match. (default: `false`) + * When `true` the regexp won't allow an optional trailing delimiter to match. (default: `false`) */ strict?: boolean; /**