Skip to main content
Module

x/ako/deps.ts>is

Expressive HTTP middleware framework for deno using async functions. Aiming to port Koa to Deno.
Latest
function is
import { is } from "https://deno.land/x/ako@1.0.0-beta.2/deps.ts";

Compare a value content-type with types. Each type can be an extension like html, a special shortcut like multipart or urlencoded, or a mime type.

If no types match, false is returned. Otherwise, the first type that matches is returned.

Parameters

mediaType: string
optional
types: string[]

Returns

boolean | string