====== JSON Schema Validator ====== const ajv = ((Ajv) => new Ajv())(require("ajv")); const configValidator = ajv.compile(require("../validators/config.validator")); // configuration preprocess and checking const config = {db:{url:"mysql://server/table"}}; if (!configValidator(config)) throw configValidator.errors; ** Полезные ссылки ** * [[https://github.com/ajv-validator/ajv|Сайт валидатора для NodeJS]] * [[https://extendsclass.com/json-schema-validator.html|Создаёт из json, схемы]]