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

Function typeofThenCheckSymbol

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

Source from the content-addressed store, hash-verified

23const keyin = (x: any) => typeof x === "object" && x && ZOD_FAILURE in x;
24// const typeofObject = (x: any) => typeof x === "object";
25const typeofThenCheckSymbol = (x: any) => typeof x === "object" && x?.[ZOD_FAILURE]; // 1.69
26const typeofThenCheckTag = (x: any) => typeof x === "object" && x?.tag === ZOD_FAILURE; // 1.69
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

Callers 1

instanceof.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected