jstransformers / jstransformer

Normalize the API of any JSTransformer.
http://npm.im/jstransformer
MIT License
153 stars 12 forks source link

ajv - JSON Schema Validator #180

Open tunnckoCore opened 7 years ago

tunnckoCore commented 7 years ago

https://github.com/epoberezkin/ajv

var Ajv = require('ajv')

exports.render = function (schema, data, options) {
  var ajv = new Ajv(options)
  return ajv.compile(schema)(data)
}

I'm not sure, but it would be some like that.