index.js
function (type) {
    var meta = findMeta(type);
    var set = joi.array().sparse(false).unique().items(type);
    return joi.alternatives().meta({
      cql: true,
      type: 'set',
      setType: meta.type,
      serialize: convertArray(meta.serialize),
      deserialize: convertArray(meta.deserialize)
    }).try(set, joi.object().keys({
      add: set,
      remove: set
    }).or('add', 'remove').unknown(false));
  }
function (type) {
    var meta = findMeta(type);
    var set = joi.array().sparse(false).unique().items(type);
    return joi.alternatives().meta({
      cql: true,
      type: 'set',
      setType: meta.type,
      serialize: convertArray(meta.serialize),
      deserialize: convertArray(meta.deserialize)
    }).try(set, joi.object().keys({
      add: set,
      remove: set
    }).or('add', 'remove').unknown(false));
  }
function ( type ) { var meta = findMeta ( type ) ; var set = joi . array ( ) . sparse ( false ) . unique ( ) . items ( type ) ; return joi . alternatives ( ) . meta ( { cql : true , type : 'set' , setType : meta . type , serialize : convertArray ( meta . serialize ) , deserialize : convertArray ( meta . deserialize ) } ) . try ( set , joi . object ( ) . keys ( { add : set , remove : set } ) . or ( 'add' , 'remove' ) . unknown ( false ) ) ; }
Create a joi object that can validate a `set` for Cassandra.

@param {Joi} type - used for validating the values of the set
@returns {Joi} - the validator
Create a joi object that can validate a set for Cassandra .