src/validation.js
function isValidTypeDescriptor(obj) {
  const validKeys = ['type', 'payload', 'meta'];

  if (!isPlainObject(obj)) {
    return false;
  }
  for (let key in obj) {
    if (!~validKeys.indexOf(key)) {
      return false;
    }
  }
  if (!('type' in obj)) {
    return false;
  } else if (typeof obj.type !== 'string' && typeof obj.type !== 'symbol') {
    return false;
  }

  return true;
}
function isValidTypeDescriptor(obj) {
  const validKeys = ['type', 'payload', 'meta'];

  if (!isPlainObject(obj)) {
    return false;
  }
  for (let key in obj) {
    if (!~validKeys.indexOf(key)) {
      return false;
    }
  }
  if (!('type' in obj)) {
    return false;
  } else if (typeof obj.type !== 'string' && typeof obj.type !== 'symbol') {
    return false;
  }

  return true;
}
function isValidTypeDescriptor ( obj ) { const validKeys = [ 'type' , 'payload' , 'meta' ] ; if ( ! isPlainObject ( obj ) ) { return false ; } for ( let key in obj ) { if ( ! ~ validKeys . indexOf ( key ) ) { return false ; } } if ( ! ( 'type' in obj ) ) { return false ; } else if ( typeof obj . type !== 'string' && typeof obj . type !== 'symbol' ) { return false ; } return true ; }
Is the given object a valid type descriptor?

@function isValidTypeDescriptor
@access private
@param {object} obj - The object to check agains the type descriptor definition
@returns {boolean}
Is the given object a valid type descriptor?