mirror of
https://github.com/lynchmarkHQ/lynchmark.com.git
synced 2026-10-19 02:07:52 +00:00
Docs: Update Gemini benchmark results
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
const validateJSON = async (d, s) => {
|
||||
const { default: A } = await import('https://esm.sh/ajv@8.17.1');
|
||||
const v = new A({ allErrors: true }).compile(s);
|
||||
const b = v(d);
|
||||
return {
|
||||
valid: b,
|
||||
errors: b ? [] : v.errors.map(e => `${e.instancePath} ${e.message}`.trim())
|
||||
};
|
||||
};
|
||||
export default validateJSON;
|
||||
Reference in New Issue
Block a user