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,13 @@
|
||||
async function validateJSON(data, schema) {
|
||||
const { default: Ajv } = await import('https://cdn.jsdelivr.net/npm/ajv@8/dist/ajv.min.js');
|
||||
const ajv = new Ajv({ allErrors: true });
|
||||
const validate = ajv.compile(schema);
|
||||
const valid = validate(data);
|
||||
return {
|
||||
valid,
|
||||
errors: valid ? [] : validate.errors.map(e => e.message)
|
||||
};
|
||||
}
|
||||
export default validateJSON;
|
||||
// Generation time: 16.498s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user