MCPcopy Create free account
hub / github.com/PostHog/duckgres / cellToString

Function cellToString

controlplane/admin/ui/src/components/JsonView.tsx:5–9  ·  view source on GitHub ↗
(v: unknown)

Source from the content-addressed store, hash-verified

3// Renders any value compactly for table cells / detail panels. Objects/arrays
4// pretty-print as monospace JSON; scalars render inline.
5export function cellToString(v: unknown): string {
6 if (v == null) return "";
7 if (typeof v === "object") return JSON.stringify(v);
8 return String(v);
9}
10
11export function JsonValue({ value, className }: { value: unknown; className?: string }) {
12 if (value == null || value === "") {

Callers 1

ModelTableFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected