Skip to main content
Module

x/keywork/mod.ts>HTTP.isCompressible

A library for building V8 Isolate web apps on Cloudflare Workers, Deno, and Node.JS
Go to Latest
function HTTP.isCompressible
Re-export
import { HTTP } from "https://deno.land/x/keywork@v6.0.1/mod.ts";
const { isCompressible } = HTTP;

Checks if a given MIME-type is compressible.

MIME type information is provided by the optional mime-db package, which can be quite large when bundled with your application.

Otherwise, the MIME type is assumed to be compressible if text, json, or xml.

Parameters

mimeType: string
optional
db: MimeDatabase

Returns

boolean