MCPcopy
hub / github.com/colinhacks/zod / falsyThenCheckTag

Function falsyThenCheckTag

packages/bench/instanceof.ts:29–29  ·  view source on GitHub ↗
(x: any)

Source from the content-addressed store, hash-verified

27const instanceofObjectThenCheckSymbol = (x: any) => x instanceof Object && x[ZOD_FAILURE]; // 1.69
28const instanceofObjectThenCheckTag = (x: any) => x instanceof Object && x.tag === ZOD_FAILURE; // 1.69
29const falsyThenCheckTag = (x: any) => x && x.tag === ZOD_FAILURE; // 1.59
30const falsyThenCheckSymbol = (x: any) => x?.[ZOD_FAILURE]; // 1.74
31const nullChainCheckSymbol = (x: any) => x?.[ZOD_FAILURE]; // 1.74
32const nullChainCheckTag = (x: any) => x?.tag === ZOD_FAILURE; // 1.74

Callers 1

instanceof.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected