The following code from processResult() has two problems:
Because max and min are declared outside the line 18 rasterIndex loop and not reset, later rasters cannot have a higher min or lower max than earlier rasters.
Because of the else on line 29, if the raster data is sorted from largest to smallest with no repeats then max is never assigned, and if the first element is the true maximum then the next-largest value will be reported instead.
The following code from processResult() has two problems:
https://github.com/GeoTIFF/georaster/blob/ad4681a27e8bfb61b428242ce9a16c741a255098/src/parseData.js#L15-L37
For a test case,
parseGeoraster([ [ [3, -3] ], [ [2, -2] ], [ [1, -1] ] ], metadata)
will calculatemaxs: [undefined, 2, 2], mins: [-3, -3, -3], ranges: [NaN, 5, 5]