Tempo Tap
tap tempo object to measure speed of successive invocations
install
npm install tempo-tap
example
var TapTempo = ; let tempo = 0; TapTempo;;;;; console; // 60
TapTempo.tap()
records a tap with Date.now(), stores inside TimeContainer returns current tempo or -1 for insufficient data
TapTempo.getLastTempo()
returns the last calculated tempo as a number
TapTempo.clear()
clears TimeContainer, reinitiates the object
TapTempo.setThreshold()
sets how many values TimeContainer must contain until it can make a tempo calculation - default is 3
license
Dual-licensed under the MIT License or the Apache License, version 2.0