code: function getValue(value, offset = 0, max = 9999) {
    return isNaN(value) ? NAMES[value] || null : Math.min(+value + (offset), max);
  }
docs: Returns the value + offset if value is a number, otherwise it
  attempts to look up the value in the NAMES table and returns
  that result instead.
  
  @param {Number,String} value: The value that should be parsed
  @param {Number=} offset: Any offset that must be added to the value
  @param {Number=} max
  @returns {Number|null}