x/oak/middleware.ts

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Very Popular
Go to Latest
function compose
import { compose } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v11.1.0/middleware.ts?s=compose";

Compose multiple middleware functions into a single middleware function.

Type Parameters

optional
S extends State = Record<string, any>
[src]
optional
T extends Context = Context<S>
[src]

Parameters

middleware: Middleware<S, T>[][src]

Returns

(context: T, next?: () => Promise<unknown>) => Promise<unknown>[src]