Skip to content

onlinestats/online-lag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

online-lag

Stores last X values of a data stream

Usage

const Lag = require('online-lag')
const lag = Lag(4)

;[1, 2, 3, [4, 5], 6, 7].forEach(v => {
  lag(v) // accepts arrays too
})

console.log('Values; total number of observations: ', l.values, l.n) // [7,6,5,4] 7

About

Stores last N values of the data stream

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published