# @types/morgan-json

> TypeScript definitions for morgan-json

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

## Install

```sh
npm install @types/morgan-json
pnpm add @types/morgan-json
yarn add @types/morgan-json
bun add @types/morgan-json
```

## 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 | 1.1.3 |
| Published | 2023-11-07 |
| First published | 2021-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 1.1.3 (latest) — 2023-11-07
- 1.1.0 (ts3.4) — 2021-02-04
- 1.1.2 — 2023-10-18
- 1.1.1 — 2023-09-27

## README

# Installation
> `npm install --save @types/morgan-json`

# Summary
This package contains type definitions for morgan-json (https://github.com/indexzero/morgan-json#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/morgan-json.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/morgan-json/index.d.ts)
````ts
import morgan = require("morgan");

interface Options {
    stringify: boolean;
}

interface FormatObject {
    [key: string]: string;
}

/**
 * Format strings
 * @example
 * :method :url :status :res[content-length] bytes :response-time ms
 * @example
 * {
 *      short: ':method :url :status',
 *      length: ':res[content-length]',
 *      'response-time': ':response-time ms'
 * }
 * @param format
 * @param opts
 */
declare function json(format: string | FormatObject, opts?: Options): morgan.FormatFn;

export = json;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/morgan](https://npmjs.com/package/@types/morgan)

# Credits
These definitions were written by [Michal Grezel](https://github.com/dracomithril).

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