@connectedcars/logutil
Version:
Simple log formatting for Node
19 lines (18 loc) • 787 B
TypeScript
/// <reference types="node" />
export type Json = null | boolean | number | string | {
[prop: string]: Json;
} | Json[];
export type JavaScriptValue = Json | bigint | Buffer | Date | undefined | JavaScriptValue[] | {
[prop: string]: JavaScriptValue | undefined;
} | Error | Map<JavaScriptValue, JavaScriptValue> | Set<JavaScriptValue> | WeakMap<object, JavaScriptValue> | WeakSet<object> | RegExp | {
new (...args: JavaScriptValue[]): JavaScriptValue;
} | ((...args: JavaScriptValue[]) => JavaScriptValue);
export declare function objectToJson(jsValue: JavaScriptValue, options?: Partial<ObjectToJsonOptions> & {
maxDepth?: number;
}): Json;
interface ObjectToJsonOptions {
maxStringLength: number;
maxArrayLength: number;
maxObjectSize: number;
}
export {};