MCPcopy Create free account
hub / github.com/liveblocks/liveblocks / quoteAsNeeded

Function quoteAsNeeded

tools/liveblocks-devtools/src/lib/stringify.ts:7–9  ·  view source on GitHub ↗
(key: string | number)

Source from the content-addressed store, hash-verified

5export const ELLIPSIS = "…";
6
7export function quoteAsNeeded(key: string | number) {
8 return unquotedPropertyValidator(String(key)).needsQuotes ? `"${key}"` : key;
9}
10
11export function wrapProperty(key: string | number, value: string) {
12 return `${quoteAsNeeded(key)}: ${value}`;

Callers 1

wrapPropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected