Skip to content

match

function match(pattern, path): Record<string, string> | null;

Defined in: src/server/http.ts:58

Match pattern (with :name segments) against path; returns the decoded params, or null. A malformed % escape is no match (404), never a thrown URIError (500).

Parameter Type
pattern string
path string

Record<string, string> | null