javascript-stringify
Version:
Stringify is to `eval` as `JSON.stringify` is to `JSON.parse`
9 lines (8 loc) • 307 B
TypeScript
/**
* Call `next()` every time you want to stringify a new value.
*/
export declare type Next = (value: any, key?: PropertyKey) => string | undefined;
/**
* Stringify a value.
*/
export declare type ToString = (value: any, space: string, next: Next, key: PropertyKey | undefined) => string | undefined;