Files
dbx/apps/desktop/src/lib/cellValue.ts
T

9 lines
313 B
TypeScript

export type CellValue = string | number | boolean | null;
export function displayCellValue(value: CellValue): string {
if (value === null) return "NULL";
if (typeof value === "boolean") return value ? "true" : "false";
if (typeof value === "object") return JSON.stringify(value);
return String(value);
}