Time Series Buffer
Simple library that takes into account data points and calculates minimums, maximums and averages.
The buffer is limited in age. Expired entries are removed.
Example
const TimeSeriesBuffer = // entries older than 1 second will be ignoredconst timeSeriesBuffer = 1000 timeSeriesBuffertimeSeriesBuffertimeSeriesBuffer timeSeriesBuffer // 2timeSeriesBuffer // 1timeSeriesBuffer // 20timeSeriesBuffer // undefinedtimeSeriesBuffer // 6timeSeriesBuffer // 20 // wait 2 seconds for the data points to expire