0.0.33 • Published 6 months ago
@types/prettyjson v0.0.33
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
// Type definitions for prettyjson
// Project: https://github.com/rafeca/prettyjson
// Definitions by: Wael BEN ZID EL GUEBSI <https://github.com/benzid-wael/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* 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: Thu, 08 Jul 2021 20:19:49 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Wael BEN ZID EL GUEBSI.
0.0.31
7 months ago
0.0.32
7 months ago
0.0.33
6 months ago
0.0.30
3 years ago
0.0.29
5 years ago
0.0.28
8 years ago
0.0.27
8 years ago
0.0.26-alpha
8 years ago
0.0.25-alpha
8 years ago
0.0.24-alpha
8 years ago
0.0.23-alpha
8 years ago
0.0.22-alpha
8 years ago
0.0.21-alpha
8 years ago
0.0.20-alpha
8 years ago
0.0.15-alpha
8 years ago
0.0.14-alpha
8 years ago