Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/fw/service/deps.ts>oak.composeMiddleware

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function oak.composeMiddleware
import { oak } from "https://deno.land/x/hex@0.6.5/src/fw/service/deps.ts";
const { composeMiddleware } = oak;

Compose multiple middleware functions into a single middleware function.

Type Parameters

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

Parameters

middleware: Middleware<S, T>[]

Returns

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