Comparing version 1.1.3 to 1.1.4
14
index.js
@@ -96,14 +96,10 @@ const Ajv = require('ajv') | ||
// Save default compile functions to convert super types | ||
Ajv.prototype._super_compile = Ajv.prototype.compile | ||
Ajv.prototype._super_compileAsync = Ajv.prototype.compileAsync | ||
// Save default validate functions to convert super types | ||
Ajv.prototype._super_validate = Ajv.prototype.validate | ||
// Redefine compile functions | ||
Ajv.prototype.compile = function (schema) { | ||
return this._super_compile(this.getSuperSchema(schema)) | ||
// Redefine validate functions | ||
Ajv.prototype.validate = function (schema, data) { | ||
return this._super_validate(this.getSuperSchema(schema), data) | ||
} | ||
Ajv.prototype.compileAsync = function (schema) { | ||
return this._super_compileAsync(this.getSuperSchema(schema)) | ||
} | ||
module.exports = Ajv |
{ | ||
"name": "super-ajv", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "AJV schema validator with super powers!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
41028
137