8000 add a note to the readme about legacy behaviour · pillarjs/path-to-regexp@8688a28 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8688a28

Browse files
committed
add a note to the readme about legacy behaviour
1 parent a8e5ddf commit 8688a28

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
21
# Path-to-RegExp
32

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.
56

67
## Usage
78

89
```javascript
910
var pathToRegexp = require('path-to-regexp');
1011
```
12+
1113
### pathToRegexp(path, keys, options)
1214

1315
- **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://
3032

3133
## License
3234

33-
MIT
35+
MIT

0 commit comments

Comments
 (0)
0