# @types/co-body

> TypeScript definitions for co-body

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

## Install

```sh
npm install @types/co-body
pnpm add @types/co-body
yarn add @types/co-body
bun add @types/co-body
```

## 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.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 6.1.3 |
| Published | 2023-11-07 |
| First published | 2016-09-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51428 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 6.1.3 (latest) — 2023-11-07
- 6.1.1 (ts4.3) — 2023-09-04
- 6.1.0 (ts3.6) — 2021-07-29
- 5.1.0 (ts2.8) — 2020-04-27
- 0.0.3 (ts2.3) — 2017-11-08
- 0.0.2 (ts2.0) — 2017-10-14
- 6.1.2 — 2023-10-17
- 5.1.1 — 2021-07-06
- 0.0.4 — 2020-04-27
- 0.0.1 — 2016-09-20

## README

# Installation
> `npm install --save @types/co-body`

# Summary
This package contains type definitions for co-body (https://github.com/cojs/co-body).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co-body.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co-body/index.d.ts)
````ts
/// <reference types="node"/>

import * as http from "http";
import * as qs from "qs";

declare namespace CoBody {
    type Context = http.IncomingMessage | { req: http.IncomingMessage };

    interface Parse {
        /**
         * @async
         */
        (context: Context, options?: Options): Promise<any>;
        /**
         * @async
         */
        text: (context: Context, options?: Options) => Promise<any>;
        /**
         * @async
         */
        form: (context: Context, options?: Options) => Promise<any>;
        /**
         * @async
         */
        json: (context: Context, options?: Options) => Promise<any>;
    }

    interface Options {
        limit?: number | string | undefined;
        strict?: boolean | undefined;
        queryString?: qs.IParseOptions | undefined;
        jsonTypes?: string[] | undefined;
        returnRawBody?: boolean | undefined;
        formTypes?: string[] | undefined;
        textTypes?: string[] | undefined;
        encoding?: string | undefined;
        length?: number | undefined;
    }
}

declare var CoBody: CoBody.Parse;
export = CoBody;

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs)

# Credits
These definitions were written by [Joshua DeVinney](https://github.com/geoffreak).

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