[fix] missing typeof
[fix] add end function to MovingAverage prototype since it is no longer a `window`