UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

14 lines 486 B
import { safelyStringifyJSON } from "./safelyStringifyJSON.js"; /** * Ensures that a value is a string. * If the value is not a string, it will be converted to a string using `safelyStringifyJSON`. * @param value - The value to ensure is a string. * @returns The value as a string. */ export function ensureString(value) { if (typeof value === "string") { return value; } return safelyStringifyJSON(value)?.json ?? ""; } //# sourceMappingURL=ensureString.js.map