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

Function instanceofPromise

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

Source from the content-addressed store, hash-verified

20
21const instanceofClass = (x: any) => x instanceof ZodFailure; // 0.64!
22const instanceofPromise = (x: any) => x instanceof Promise; // 0.64!
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

Callers 1

instanceof.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected