MCPcopy Create free account
hub / github.com/TanStack/query / valueText

Function valueText

packages/query-devtools/src/Explorer.tsx:595–615  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

593 />
594 )
595 const valueText = () => {
596 if (!props.search) return displayValue(props.value)
597 switch (props.search.match.kind) {
598 case 'circular':
599 return '[Circular]'
600 case 'accessor':
601 return '[Getter]'
602 case 'opaque':
603 return '[Object]'
604 case 'branch':
605 return Array.isArray(props.value)
606 ? '[]'
607 : nativeObjectType() === 'Map'
608 ? 'Map(0)'
609 : nativeObjectType() === 'Set'
610 ? 'Set(0)'
611 : '{}'
612 case 'value':
613 return primitiveText(props.value)
614 }
615 }
616 const renderedValue = () => (
617 <>
618 {props.search && typeof props.value === 'string' ? '"' : ''}

Callers 1

renderedValueFunction · 0.85

Calls 2

displayValueFunction · 0.90
primitiveTextFunction · 0.90

Tested by

no test coverage detected