MCPcopy Create free account
hub / github.com/TanStack/db / isPrimitive

Function isPrimitive

packages/db/src/query/predicate-utils.ts:1121–1129  ·  view source on GitHub ↗

* Check if a value is a primitive (string, number, boolean, null, undefined) * Primitives can use Set for fast lookups

(value: any)

Source from the content-addressed store, hash-verified

1119 * Primitives can use Set for fast lookups
1120 */
1121function isPrimitive(value: any): boolean {
1122 return (
1123 value === null ||
1124 value === undefined ||
1125 typeof value === `string` ||
1126 typeof value === `number` ||
1127 typeof value === `boolean`
1128 )
1129}
1130
1131/**
1132 * Check if all values in an array are primitives

Callers 2

arrayIncludesWithSetFunction · 0.85
isComparisonSubsetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected