@fjell/logging
Version:
Logging for Fjell
18 lines (17 loc) • 716 B
TypeScript
/**
* Cross-platform utility functions that work in both Node.js and browser environments
*/
/**
* Recursive implementation of JSON.stringify that handles circular references safely
*/
export declare const stringifyJSON: (obj: any, visited?: Set<any>) => string;
/**
* Simple string formatting that works in both Node.js and browser environments
* Handles format specifiers like %s, %d, %j, %i, %f similar to Node.js util.format
*/
export declare const safeFormat: (message: string, ...args: any[]) => string;
/**
* Safe object inspection that works in both Node.js and browser environments
* Uses stringifyJSON for consistent, safe serialization
*/
export declare const safeInspect: (obj: any) => string;