MCPcopy Create free account
hub / github.com/arktypeio/arktype / standardOf

Function standardOf

ark/type/runtime.ts:437–448  ·  view source on GitHub ↗
(
	validator: Validator,
	attributes: ValidatorAttributes
)

Source from the content-addressed store, hash-verified

435})) satisfies Fn
436
437const standardOf = (
438 validator: Validator,
439 attributes: ValidatorAttributes
440): StandardSchemaV1.Props =>
441 freeze({
442 vendor: "arktype",
443 version: 1,
444 validate: freeze((input: unknown, options?: StandardSchemaV1.Options) =>
445 standardValidated(validator, input, options)
446 ),
447 ...attributes["~standard"]
448 })
449
450// parenthesized (kept by `satisfies`) to compile as the module loads
451export const createValidator = ((

Callers 2

observeFunction · 0.85
runtime.tsFile · 0.85

Calls 1

standardValidatedFunction · 0.85

Tested by 1

observeFunction · 0.68