netlog_viewer/netlog_viewer/main.js
function areValidConstants(receivedConstants) {
  return typeof(receivedConstants) === 'object' &&
      typeof(receivedConstants.logEventTypes) === 'object' &&
      typeof(receivedConstants.clientInfo) === 'object' &&
      typeof(receivedConstants.logEventPhase) === 'object' &&
      typeof(receivedConstants.logSourceType) === 'object' &&
      typeof(receivedConstants.loadFlag) === 'object' &&
      typeof(receivedConstants.netError) === 'object' &&
      typeof(receivedConstants.addressFamily) === 'object' &&
      isNetLogNumber(receivedConstants.timeTickOffset) &&
      typeof(receivedConstants.logFormatVersion) === 'number';
}
function areValidConstants(receivedConstants) {
  return typeof(receivedConstants) === 'object' &&
      typeof(receivedConstants.logEventTypes) === 'object' &&
      typeof(receivedConstants.clientInfo) === 'object' &&
      typeof(receivedConstants.logEventPhase) === 'object' &&
      typeof(receivedConstants.logSourceType) === 'object' &&
      typeof(receivedConstants.loadFlag) === 'object' &&
      typeof(receivedConstants.netError) === 'object' &&
      typeof(receivedConstants.addressFamily) === 'object' &&
      isNetLogNumber(receivedConstants.timeTickOffset) &&
      typeof(receivedConstants.logFormatVersion) === 'number';
}
function areValidConstants ( receivedConstants ) { return typeof ( receivedConstants ) === 'object' && typeof ( receivedConstants . logEventTypes ) === 'object' && typeof ( receivedConstants . clientInfo ) === 'object' && typeof ( receivedConstants . logEventPhase ) === 'object' && typeof ( receivedConstants . logSourceType ) === 'object' && typeof ( receivedConstants . loadFlag ) === 'object' && typeof ( receivedConstants . netError ) === 'object' && typeof ( receivedConstants . addressFamily ) === 'object' && isNetLogNumber ( receivedConstants . timeTickOffset ) && typeof ( receivedConstants . logFormatVersion ) === 'number' ; }
Returns true if it's given a valid-looking constants object.
@param {Object} receivedConstants The received map of constants.
@return {boolean} True if the |receivedConstants| object appears valid.
Returns true if it s given a valid - looking constants object .