Installation
npm install --save @types/json-stable-stringify
Summary
This package contains type definitions for json-stable-stringify (https://github.com/substack/json-stable-stringify).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-stable-stringify.
declare function stringify(obj: any, opts?: stringify.Comparator | stringify.Options): string;
declare namespace stringify {
interface Element {
key: string;
value: any;
}
type Comparator = (a: Element, b: Element) => number;
type Replacer = (key: string, value: any) => any;
interface Options {
cmp?: Comparator;
space?: string | number;
replacer?: Replacer;
cycles?: boolean;
}
}
export = stringify;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Matt Frantz.