zzon
Version:
A fast, spec compliant, ZON parser and serializer for JavaScript.
15 lines (14 loc) • 1 kB
TypeScript
/**
* Converts a Zig value to a Zig Object Notation (ZON) string.
* @param value A Zig value, usually an object or array, to be converted.
* @param replacer A function that transforms the results.
* @param space Adds indentation, white space, and line break characters to the return-value ZON text to make it easier to read.
*/
export declare function stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
/**
* Converts a Zig value to a Zig Object Notation (ZON) string.
* @param value A Zig value, usually an object or array, to be converted.
* @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
* @param space Adds indentation, white space, and line break characters to the return-value ZON text to make it easier to read.
*/
export declare function stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;