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
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
-
2
1
# Path-to-RegExp
3
2
4
-
Turn an Express-style path string such as `/user/:name` into a regular expression.
3
+
Turn an Express-style path string such as `/user/:name` into a regular expression.
4
+
5
+
**Note:** This is a legacy branch. You should upgrade to `1.x`. If you find you are stuck on this version, your code will need to take into account the `index` property on the keys.
5
6
6
7
## Usage
7
8
8
9
```javascript
9
10
var pathToRegexp =require('path-to-regexp');
10
11
```
12
+
11
13
### pathToRegexp(path, keys, options)
12
14
13
15
-**path** A string in the express format, an array of such strings, or a regular expression
@@ -30,4 +32,4 @@ You can see a live demo of this library in use at [express-route-tester](http://
0 commit comments