TypeScript definitions for prettyjson
- License
- MIT
- Deps
- 0
- Install Size
- 5.3 kB/-
- Vulns
- 0
- Published
$
npm install @types/prettyjson$
pnpm add @types/prettyjson$
yarn add @types/prettyjson$
bun add @types/prettyjson$
deno add npm:@types/prettyjson$
vlt install @types/prettyjson# Usually installed as a dev dependency
$
npm install -D @types/prettyjson$
pnpm add -D @types/prettyjson$
yarn add -D @types/prettyjson$
bun add -d @types/prettyjson$
deno add -D npm:@types/prettyjson$
vlt install -D @types/prettyjsonInstallation
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
/**
* 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.