Last active
June 13, 2017 13:22
-
-
Save big-kahuna-burger/b2a741d40dbe25f9190d5fb84aafb18c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Ajv = require('ajv') | |
var ajv = require('ajv-async')(new Ajv()) | |
//schema configuration here | |
module.exports = function(schema, object, cb){ | |
return ajv.validate(schema, object) | |
.then(function (value) { | |
cb(null, value) | |
}, cb) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment