mirror of
https://github.com/lynchmarkHQ/lynchmark.com.git
synced 2026-10-19 18:24:50 +00:00
Docs: Update Gemini benchmark results
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
const validateJSON = async (data, schema) => {
|
||||
const Ajv = (await import('https://esm.sh/ajv@8.17.1')).default
|
||||
const validate = new Ajv({ allErrors: true }).compile(schema)
|
||||
const valid = validate(data)
|
||||
return { valid, errors: validate.errors?.map(e => e.message) ?? [] }
|
||||
}
|
||||
export default validateJSON;
|
||||
Reference in New Issue
Block a user