mirror of
https://github.com/lynchmarkHQ/lynchmark.com.git
synced 2026-10-19 10:14:51 +00:00
Docs: Update benchmark results
This commit is contained in:
@@ -1,8 +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) };
|
||||
async function validateJSON(d,s){
|
||||
const {default:Ajv}=await import('https://cdn.skypack.dev/ajv');
|
||||
const a=new Ajv({allErrors:true});
|
||||
const v=a.compile(s);
|
||||
const ok=v(d);
|
||||
return{valid:ok,errors:ok?[]:(v.errors||[]).map(e=>e.message||'')};
|
||||
}
|
||||
export default validateJSON;
|
||||
Reference in New Issue
Block a user