index.js
function validate(object, validator, callback) {
  if (typeof callback === 'function') {
    return Joi.validate(object, validator, callback);
  } else {
    return Joi.validate(object, validator);
  }
}
function validate(object, validator, callback) {
  if (typeof callback === 'function') {
    return Joi.validate(object, validator, callback);
  } else {
    return Joi.validate(object, validator);
  }
}
function validate ( object , validator , callback ) { if ( typeof callback === 'function' ) { return Joi . validate ( object , validator , callback ) ; } else { return Joi . validate ( object , validator ) ; } }
The Joi validator function.
The Joi validator function .