Maximilian Gold 4f8071fffe Uploaded the base of the project the working demo of CH1 Multiplayer Game Development with HTML5 | 3 years ago | |
---|---|---|
.. | ||
.npmignore | 3 years ago | |
History.md | 3 years ago | |
Readme.md | 3 years ago | |
component.json | 3 years ago | |
index.js | 3 years ago | |
package.json | 3 years ago | |
test.js | 3 years ago |
Turn an Express-style path string such as /user/:name
into a regular expression.
var pathToRegexp = require('path-to-regexp');
var keys = [];
var exp = pathToRegexp('/foo/:bar', keys);
//keys = ['bar']
//exp = /^\/foo\/(?:([^\/]+?))\/?$/i
You can see a live demo of this library in use at express-route-tester.
MIT