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

Function check

packages/zod/src/v4/mini/schemas.ts:1774–1782  ·  view source on GitHub ↗
(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams)

Source from the content-addressed store, hash-verified

1772// custom checks
1773// @__NO_SIDE_EFFECTS__
1774export function check<O = unknown>(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams): core.$ZodCheck<O> {
1775 const ch = new core.$ZodCheck({
1776 check: "custom",
1777 ...util.normalizeParams(params),
1778 });
1779
1780 ch._zod.check = fn;
1781 return ch;
1782}
1783
1784// ZodCustom
1785// custom schema

Callers 3

refineFunction · 0.50
refinementFunction · 0.50
customFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected