function rangeCheck(fnName, index, maxIndex) {
  if (typeof index !== 'number' || index < 0 || index > maxIndex) {
    throw new Error('Failed to execute \'' + fnName + '\' on \'TimeRanges\': The index provided (' + index + ') is non-numeric or out of bounds (0-' + maxIndex + ').');
  }
}
function rangeCheck(fnName, index, maxIndex) {
  if (typeof index !== 'number' || index < 0 || index > maxIndex) {
    throw new Error('Failed to execute \'' + fnName + '\' on \'TimeRanges\': The index provided (' + index + ') is non-numeric or out of bounds (0-' + maxIndex + ').');
  }
}
function rangeCheck ( fnName , index , maxIndex ) { if ( typeof index !== 'number' || index < 0 || index > maxIndex ) { throw new Error ( 'Failed to execute \'' + fnName + '\' on \'TimeRanges\': The index provided (' + index + ') is non-numeric or out of bounds (0-' + maxIndex + ').' ) ; } }
An object that contains ranges of time for various reasons.

@typedef {Object} TimeRange

@property {number} length
The number of time ranges represented by this Object

@property {time-ranges:indexFunction} start
Returns the time offset at which a specified time range begins.

@property {time-ranges:indexFunction} end
Returns the time offset at which a specified time range begins.

@see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges
 
Check if any of the time ranges are over the maximum index.

@param {string} fnName
The function name to use for logging

@param {number} index
The index to check

@param {number} maxIndex
The maximum possible index

@throws {Error} if the timeRanges provided are over the maxIndex
An object that contains ranges of time for various reasons .