Skip to main content

isCompressible

Overview

isCompressible

(mimeType, db?): `boolean`

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

NameTypeDescription
mimeTypestring
db?MimeDatabase

Returns

boolean

Defined in

http/functions/isCompressable.ts:34