# @types/prettyjson

> TypeScript definitions for prettyjson

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

## Install

```sh
npm install @types/prettyjson
pnpm add @types/prettyjson
yarn add @types/prettyjson
bun add @types/prettyjson
```

## 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.0.33 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51440 |
| Maintainers | types |

## Links

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

## Recent versions

- 0.0.33 (latest) — 2023-11-07
- 0.0.30 (ts3.6) — 2021-07-08
- 0.0.29 (ts2.0) — 2019-03-29
- 0.0.32 — 2023-10-18
- 0.0.31 — 2023-09-24
- 0.0.28 — 2016-09-19
- 0.0.27 — 2016-07-14
- 0.0.26-alpha — 2016-07-08
- 0.0.25-alpha — 2016-07-04
- 0.0.24-alpha — 2016-07-02
- 0.0.23-alpha — 2016-07-01
- 0.0.22-alpha — 2016-07-01
- 0.0.21-alpha — 2016-05-25
- 0.0.20-alpha — 2016-05-20
- 0.0.15-alpha — 2016-05-19
- … 1 more at https://npm.io/package/@types/prettyjson/versions

## README

# Installation
> `npm install --save @types/prettyjson`

# Summary
This package contains type definitions for prettyjson (https://github.com/rafeca/prettyjson).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prettyjson.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prettyjson/index.d.ts)
````ts
/**
 * Defines prettyjson version
 */
export declare var version: string;

/**
 * Render pretty json.
 *
 * @param data {any} Data to prettify.
 * @param options {IOptions} Hash with different options to configure the renderer.
 * @param indentation {number} Indentation size.
 *
 * @return {string} pretty serialized json data ready to display.
 */
export declare function render(data: any, options?: RendererOptions, indentation?: number): string;

/**
 * Render pretty json from a string.
 *
 * @param data {string} Serialized JSON data to prettify.
 * @param options {IOptions} Hash with different options to configure the renderer.
 * @param indentation {number} Indentation size.
 *
 * @return {string} pretty serialized json data ready to display.
 */
export declare function renderString(data: string, options?: RendererOptions, indentation?: number): string;

export interface RendererOptions {
    /**
     * Define behavior for Array objects
     */
    emptyArrayMsg?: string | undefined; // default: (empty)
    inlineArrays?: boolean | undefined;
    noAlign?: boolean | undefined;

    /**
     * Color definition
     */
    noColor?: boolean | undefined;
    keysColor?: string | undefined;
    dashColor?: string | undefined;
    numberColor?: string | undefined;
    stringColor?: string | undefined;

    defaultIndentation?: number | undefined;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Wael BEN ZID EL GUEBSI](https://github.com/benzid-wael).

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