fixed-array.js
function FixedValueHistory(maxLength, initial) {
  if (!(this instanceof FixedValueHistory))
    return new FixedValueHistory(maxLength, initial)
  if (!isNumber(maxLength) || maxLength == 0) {
    throw new Error("maxLength must be a positive number.")
  }
  this.maxLength = Math.floor(+maxLength)
  if (initial != null) {
    this.push(initial)
  }
}
function FixedValueHistory(maxLength, initial) {
  if (!(this instanceof FixedValueHistory))
    return new FixedValueHistory(maxLength, initial)
  if (!isNumber(maxLength) || maxLength == 0) {
    throw new Error("maxLength must be a positive number.")
  }
  this.maxLength = Math.floor(+maxLength)
  if (initial != null) {
    this.push(initial)
  }
}
A fixed-length storage mechanism for a value (ideally a number) with some statistics methods. Expires oldest values to Input is not type checked, but non-numeric input will be considered NULL WRT the statistical methods.