index.js
function (type) {
    var meta = findMeta(type);
    var list = joi.array().sparse(false).items(type);
    return joi.alternatives().meta({
      cql: true,
      type: 'list',
      listType: meta.type,
      serialize: convertArray(meta.serialize),
      deserialize: convertArray(meta.deserialize)
    }).try(list, joi.object().keys({
      prepend: list,
      append: list,
      remove: list,
      index: joi.object().pattern(/^\d+$/, type)
    }).or('prepend', 'append', 'remove', 'index').unknown(false));
  }
function (type) {
    var meta = findMeta(type);
    var list = joi.array().sparse(false).items(type);
    return joi.alternatives().meta({
      cql: true,
      type: 'list',
      listType: meta.type,
      serialize: convertArray(meta.serialize),
      deserialize: convertArray(meta.deserialize)
    }).try(list, joi.object().keys({
      prepend: list,
      append: list,
      remove: list,
      index: joi.object().pattern(/^\d+$/, type)
    }).or('prepend', 'append', 'remove', 'index').unknown(false));
  }
function ( type ) { var meta = findMeta ( type ) ; var list = joi . array ( ) . sparse ( false ) . items ( type ) ; return joi . alternatives ( ) . meta ( { cql : true , type : 'list' , listType : meta . type , serialize : convertArray ( meta . serialize ) , deserialize : convertArray ( meta . deserialize ) } ) . try ( list , joi . object ( ) . keys ( { prepend : list , append : list , remove : list , index : joi . object ( ) . pattern ( / ^\d+$ / , type ) } ) . or ( 'prepend' , 'append' , 'remove' , 'index' ) . unknown ( false ) ) ; }
Create a joi object that can validate a `list` for Cassandra.

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