@types/koa-compress
- Version 4.0.6
- Published
- 5.97 kB
- 2 dependencies
- MIT license
Install
npm i @types/koa-compress
yarn add @types/koa-compress
pnpm add @types/koa-compress
Overview
TypeScript definitions for koa-compress
Index
Functions
Interfaces
Functions
function koaCompress
koaCompress: (options?: koaCompress.CompressOptions) => Koa.Middleware;
Compress middleware for Koa
Interfaces
interface CompressOptions
interface CompressOptions {}
property br
br?: zlib.BrotliOptions | false | undefined;
Options for brotli compression.
property defaultEncoding
defaultEncoding?: string | undefined;
An optional string, which specifies what encoders to use for requests without Accept-Encoding. Default: 'idenity'.
property deflate
deflate?: zlib.ZlibOptions | false | undefined;
Options for deflate compression.
property filter
filter?: ((mimeType: string) => boolean) | undefined;
An optional function that checks the response content type to decide whether to compress. By default, it uses compressible.
property gzip
gzip?: zlib.ZlibOptions | false | undefined;
Options for gzip compression.
property threshold
threshold?: number | string | undefined;
Minimum response size in bytes to compress. Default 1024 bytes or 1kb.
Package Files (1)
Dependencies (2)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/koa-compress
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/koa-compress)
- HTML<a href="https://www.jsdocs.io/package/@types/koa-compress"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1577 ms. - Missing or incorrect documentation? Open an issue for this package.