Skip to main content

@fartlabs/rt@0.0.2

Minimal HTTP router library based on the URLPattern API.

Works with
It is unknown whether this package works with Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Browsers
JSR Score
100%
Published
5 days ago
indexall symbols

Classes

c
Router
from main

Router is an HTTP router based on the URLPattern API.

Functions

f
createRouter
from main

createRouter creates a new router.

Interfaces

I
ErrorHandle
from main

ErrorHandle is called to handle an error.

I
Handle
from main

Handle is called to handle a request.

I
Route
from main

Route represents a the pairing of a matcher and a handler.

I
RouterContext
from main

RouterContext is the object passed to a router.

Type Aliases

T
Match
from main

Match is a type which matches a Request object.

T
Method
from main

Method is a type which represents an HTTP method.

T
Routes
from main

Routes is a sequence of routes.

Variables

v
METHODS
from main

METHODS is the list of HTTP methods.