lib/index.js
function isCollationValid(collation) {
  let isValid = true;
  _.forIn(collation, function(value, key) {
    const itemIndex = _.findIndex(COLLATION_OPTIONS, key);
    if (itemIndex === -1) {
      debug('Collation "%s" is invalid bc of its keys', collation);
      isValid = false;
    }
    if (COLLATION_OPTIONS[itemIndex][key].includes(value) === false) {
      debug('Collation "%s" is invalid bc of its values', collation);
      isValid = false;
    }
  });
  return isValid ? collation : false;
}
function isCollationValid(collation) {
  let isValid = true;
  _.forIn(collation, function(value, key) {
    const itemIndex = _.findIndex(COLLATION_OPTIONS, key);
    if (itemIndex === -1) {
      debug('Collation "%s" is invalid bc of its keys', collation);
      isValid = false;
    }
    if (COLLATION_OPTIONS[itemIndex][key].includes(value) === false) {
      debug('Collation "%s" is invalid bc of its values', collation);
      isValid = false;
    }
  });
  return isValid ? collation : false;
}
function isCollationValid ( collation ) { let isValid = true ; _ . forIn ( collation , function ( value , key ) { const itemIndex = _ . findIndex ( COLLATION_OPTIONS , key ) ; if ( itemIndex === - 1 ) { debug ( 'Collation "%s" is invalid bc of its keys' , collation ) ; isValid = false ; } if ( COLLATION_OPTIONS [ itemIndex ] [ key ] . includes ( value ) === false ) { debug ( 'Collation "%s" is invalid bc of its values' , collation ) ; isValid = false ; } } ) ; return isValid ? collation : false ; }
Validation of collation object keys and values.

@param {Object} collation
@return {Boolean|Object} false if not valid, otherwise the parsed project.
Validation of collation object keys and values .