index.js
function validator (data, schema) {
  const result = Object.assign({}, data)
  Object.keys(schema).map(key => {
    let value = schema[key]
    const type = typeof value
    if (type !== 'object') {
      value = {
        transform: value
      }
    }
    validate(value, result, key)
  })
  return result
}
function validator (data, schema) {
  const result = Object.assign({}, data)
  Object.keys(schema).map(key => {
    let value = schema[key]
    const type = typeof value
    if (type !== 'object') {
      value = {
        transform: value
      }
    }
    validate(value, result, key)
  })
  return result
}
function validator ( data , schema ) { const result = Object . assign ( { } , data ) Object . keys ( schema ) . map ( key => { let value = schema [ key ] const type = typeof value if ( type !== 'object' ) { value = { transform : value } } validate ( value , result , key ) } ) return result }
Validate object against schema.

@param {Object} data
@param {Object} schema
@return {Object}
@api public
Validate object against schema .