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

Function valueText

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

Source from the content-addressed store, hash-verified

556 />
557 )
558 const valueText = () => {
559 if (!props.search) return displayValue(props.value)
560 switch (props.search.match.kind) {
561 case 'circular':
562 return '[Circular]'
563 case 'accessor':
564 return '[Getter]'
565 case 'opaque':
566 return '[Object]'
567 case 'branch':
568 return Array.isArray(props.value)
569 ? '[]'
570 : nativeObjectType() === 'Map'
571 ? 'Map(0)'
572 : nativeObjectType() === 'Set'
573 ? 'Set(0)'
574 : '{}'
575 case 'value':
576 return primitiveText(props.value)
577 }
578 }
579 const renderedValue = () => (
580 <>
581 {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