mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-07-26 20:58:51 +00:00
apps
data analysis
website
functions
node_modules
.bin
@types
accepts
array-flatten
body-parser
buffer-equal-constant-time
bytes
content-disposition
content-type
cookie
cookie-signature
cors
debug
depd
destroy
ecdsa-sig-formatter
ee-first
encodeurl
escape-html
etag
express
finalhandler
firebase-functions
forwarded
fresh
http-errors
iconv-lite
inherits
ipaddr.js
jsonwebtoken
jwa
jws
lodash
lodash.includes
lodash.isboolean
lodash.isinteger
lodash.isnumber
lodash.isplainobject
lodash.isstring
lodash.once
media-typer
merge-descriptors
methods
mime
mime-db
mime-types
ms
negotiator
npm
object-assign
on-finished
parseurl
path-to-regexp
History.md
LICENSE
Readme.md
index.js
package.json
proxy-addr
qs
range-parser
raw-body
safe-buffer
safer-buffer
send
serve-static
setprototypeof
statuses
type-is
unpipe
utils-merge
vary
public
.firebaserc
.gitignore
.runtimeconfig.json
firebase-debug.log
firebase.json
firestore.indexes.json
firestore.rules
package-lock.json
.gitattributes
.gitignore
Path-to-RegExp
Turn an Express-style path string such as /user/:name
into a regular expression.
Note: This is a legacy branch. You should upgrade to 1.x
.
Usage
var pathToRegexp = require('path-to-regexp');
pathToRegexp(path, keys, options)
- path A string in the express format, an array of such strings, or a regular expression
- keys An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings.
- options
- options.sensitive Defaults to false, set this to true to make routes case sensitive
- options.strict Defaults to false, set this to true to make the trailing slash matter.
- options.end Defaults to true, set this to false to only match the prefix of the URL.
var keys = [];
var exp = pathToRegexp('/foo/:bar', keys);
//keys = ['bar']
//exp = /^\/foo\/(?:([^\/]+?))\/?$/i
Live Demo
You can see a live demo of this library in use at express-route-tester.
License
MIT