Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/fsrouter/core/route.ts>Route

A file system based router for Deno.
Latest
class Route
import { Route } from "https://deno.land/x/fsrouter@3.1.0/core/route.ts";

Constructors

new
Route(
file: string,
absPath: string,
absRootDir: string,
handler: FsHandler,
)

Properties

readonly
baseLength: number
readonly
hasSlugs: boolean
readonly
length: number
readonly
parsed: string
readonly
parts: string[]
readonly
rawParts: string[]
readonly
regEx: RegExp
readonly
relativePath: string
readonly
slugs: Slug[]

Methods

matches(urlPath: string, convertToNumber: boolean): Matches | null

Static Methods

create(
filePath: string,
rootDir: string,
handler?: FsHandler,
): Promise<Route>
sort(routes: Route[]): Route[]