UNPKG

@accounter/modern-poalim-scraper

Version:

A new architecture for Israeli bank scrapers to hopefully merge into [Israeli-bank-scrapers](https://github.com/eshaham/israeli-bank-scrapers) when they are ready

16 lines 481 B
import Ajv from 'ajv'; import addFormats from 'ajv-formats'; export async function validateSchema(jsonSchema, data) { const ajv = new Ajv({ verbose: true, allowMatchingProperties: true }); addFormats(ajv); let valid; try { valid = ajv.validate(jsonSchema, data); } catch (e) { console.log(e); return { isValid: false, errors: e }; } return { isValid: valid, errors: ajv.errors }; } //# sourceMappingURL=validate-schema.js.map