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

Function validateItems

lib/vocabularies/code.ts:119–132  ·  view source on GitHub ↗
(notValid: () => void)

Source from the content-addressed store, hash-verified

117 return valid
118
119 function validateItems(notValid: () => void): void {
120 const len = gen.const("len", _`${data}.length`)
121 gen.forRange("i", 0, len, (i) => {
122 cxt.subschema(
123 {
124 keyword,
125 dataProp: i,
126 dataPropType: Type.Num,
127 },
128 valid
129 )
130 gen.if(not(valid), notValid)
131 })
132 }
133}
134
135export function validateUnion(cxt: KeywordCxt): void {

Callers 1

validateArrayFunction · 0.70

Calls 6

_Function · 0.90
notFunction · 0.90
constMethod · 0.80
forRangeMethod · 0.80
subschemaMethod · 0.80
ifMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…