1.0.1 • Published 7 years ago
cycle-statistics v1.0.1
Cycle Statistics
This module would be useful for statistics.
Install
npm install cycle-statistics
Example
const CycleStatistics = require('cycle-statistics')
const statistics = new CycleStatistics.Max
statistics.push(2) // => 2
statistics.push(1) // => 2
statistics.push(3) // => 3
statistics.restart() // => 3
+statistics // => 3
statistics.push(2) // => 2
statistics.push(1) // => 2
statistics.push(3) // => 3
Statistic Types
- Last (default)
- Max
- Min
- Duration