MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / getPropLabel

Function getPropLabel

packages/logger/src/log.ts:368–386  ·  view source on GitHub ↗
(
    type: 'Getter' | 'Value',
    name: string,
    value: unknown,
    occurrence: 'added' | 'removed' | null,
)

Source from the content-addressed store, hash-verified

366}
367
368export function getPropLabel(
369 type: 'Getter' | 'Value',
370 name: string,
371 value: unknown,
372 occurrence: 'added' | 'removed' | null,
373): any[] {
374 // stayed
375 if (occurrence === null)
376 return [`${inGray(type)} ${name} ${inGray('=')}${getValueSpecifier(value)}`, value]
377 // added
378 if (occurrence === 'added')
379 return [
380 `${inGray(type)} ${name}%c new ${inGray('=')}${getValueSpecifier(value)}`,
381 STYLES.new,
382 value,
383 ]
384 // removed
385 return [`${inGray(type)} %c${name}`, 'text-decoration: line-through; color: #888']
386}

Callers 1

debugPropsFunction · 0.90

Calls 2

inGrayFunction · 0.85
getValueSpecifierFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…