UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

15 lines 426 B
/** * Safely stringify a JSON object * * @param args - The arguments to pass to JSON.stringify * @returns An object containing both the stringified JSON and the error if there was one */ export function safelyStringifyJSON(...args) { try { return { json: JSON.stringify(...args) }; } catch (e) { return { json: null, stringifyError: e }; } } //# sourceMappingURL=safelyStringifyJSON.js.map