mirror of
https://github.com/lynchmarkHQ/lynchmark.com.git
synced 2026-10-18 17:57:55 +00:00
Docs: Update benchmark results
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
async function validateJSON(o, s) {
|
||||
const { default: Ajv } = await import('https://esm.sh/ajv@8');
|
||||
const a = new Ajv({ allErrors: true });
|
||||
const v = a.compile(s);
|
||||
const ok = v(o);
|
||||
return { valid: ok, errors: ok ? [] : v.errors.map(e => e.message) };
|
||||
}
|
||||
export default validateJSON;
|
||||
Reference in New Issue
Block a user