MCPcopy
hub / github.com/ajv-validator/ajv / validateAsync

Function validateAsync

lib/compile/validate/keyword.ts:61–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 }
60
61 function validateAsync(): Name {
62 const ruleErrs = gen.let("ruleErrs", null)
63 gen.try(
64 () => assignValid(_`await `),
65 (e) =>
66 gen.assign(valid, false).if(
67 _`${e} instanceof ${it.ValidationError as Name}`,
68 () => gen.assign(ruleErrs, _`${e}.errors`),
69 () => gen.throw(e)
70 )
71 )
72 return ruleErrs
73 }
74
75 function validateSync(): Code {
76 const validateErrs = _`${validateRef}.errors`

Callers 1

validateKeywordFunction · 0.85

Calls 7

_Function · 0.90
assignValidFunction · 0.85
letMethod · 0.80
tryMethod · 0.80
ifMethod · 0.80
assignMethod · 0.80
throwMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…