@the-goat/core
Version:
    || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
var jsonschema_1 = require("jsonschema");
var notifier_1 = __importDefault(require("../notifier"));
/**
* Validate the config object against the provided schema
*/
function checkSchema(config, schema) {
var result = jsonschema_1.validate(config, schema);
if (result.errors.length === 0) {
return true;
}
result.errors.forEach(function (error) {
notifier_1.default.error(error.property.replace('instance.', '') + " " + error.message);
});
return false;
}
exports.default = checkSchema;
//# sourceMappingURL=schema.js.map