# @types/shrink-ray

> TypeScript definitions for shrink-ray

Latest version **0.1.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/shrink-ray
pnpm add @types/shrink-ray
yarn add @types/shrink-ray
bun add @types/shrink-ray
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-11-07 |
| First published | 2017-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/shrink-ray
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/shrink-ray
- npm.io page: https://npm.io/package/@types/shrink-ray

## Dependencies (1)

- [@types/express](https://npm.io/package/@types/express.md) *

## Recent versions

- 0.1.5 (latest) — 2023-11-07
- 0.1.2 (ts3.6) — 2021-07-06
- 0.1.1 (ts2.3) — 2019-02-13
- 0.1.4 — 2023-10-18
- 0.1.3 — 2023-09-25
- 0.1.0 — 2017-12-07

## README

# Installation
> `npm install --save @types/shrink-ray`

# Summary
This package contains type definitions for shrink-ray (https://github.com/aickin/shrink-ray).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/shrink-ray.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/shrink-ray/index.d.ts)
````ts
import { Request, RequestHandler, Response } from "express";
import * as zlib from "zlib";
type FilterFunction = (req: Request, res: Response) => boolean;

type Options = Partial<{
    cacheSize: number;
    threshold: number;
    zlib: Partial<{
        /** default: zlib.constants.Z_NO_FLUSH */
        flush?: number | undefined;

        /** default: zlib.constants.Z_FINISH */
        finishFlush?: number | undefined;

        /** default: 16*1024 */
        chunkSize?: number | undefined;
        windowBits?: number | undefined;

        /** compression only */
        strategy?: number | undefined;

        /** deflate/inflate only, empty dictionary by default */
        dictionary?: any;

        /** compression only */
        level: -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;

        /** compression only */
        memLevel: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
    }>;
    brotli: {
        lgblock: number;
        lgwin: number;
        mode: 0 | 1 | 2;
        quality: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
    };
    filter: FilterFunction;
    cache(req: Request, res: Response): boolean;
}>;

interface CreateMiddleware {
    (options?: Options): RequestHandler;
    filter: FilterFunction;
}

declare const createMiddleware: CreateMiddleware;

export = createMiddleware;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express)

# Credits
These definitions were written by [forabi](https://github.com/forabi).

---
_Source: https://npm.io/package/@types/shrink-ray · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
