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

Function test

.runkit_example.js:19–23  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

17test({foo: 2, bar: 4})
18
19function test(data) {
20 const valid = validate(data)
21 if (valid) console.log("Valid!")
22 else console.log("Invalid: " + ajv.errorsText(validate.errors))
23}

Callers 1

.runkit_example.jsFile · 0.70

Calls 3

validateFunction · 0.85
logMethod · 0.80
errorsTextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…