perfect-logger
Version:
A zero-dependency, isomorphic logger for Node.js and Browsers with plugin support.
9 lines (8 loc) • 501 B
TypeScript
/**
* A safe version of JSON.stringify that handles circular references.
* @param obj The object to stringify.
* @param replacer A function that alters the behavior of the stringification process.
* @param space A String or Number object that's used to insert white space into the output JSON string for readability purposes.
* @returns A JSON string.
*/
export declare function safeStringify(obj: unknown, replacer?: ((key: string, value: any) => any) | null, space?: string | number): string;