index.js
function defaultify(type, validator, options) {
  return options && options.default ? defaults[type](validator, options) : validator;
}
function defaultify(type, validator, options) {
  return options && options.default ? defaults[type](validator, options) : validator;
}
function defaultify ( type , validator , options ) { return options && options . default ? defaults [ type ] ( validator , options ) : validator ; }
Create a default based on a string identifier if one is provided.

@param {String} type - types of defaults [date, uuid]
@param {Joi} validator - the object being defaulted
@param {DefaultSpecifierOptions} options - the options for creating the default
@returns {Joi} - the new validator, possibly with a default
Create a default based on a string identifier if one is provided .