Socket
Socket
Sign inDemoInstall

avg-stream

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    avg-stream

average the last n samples and emit the result as a stream


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
17.1 kB
Created
Weekly downloads
 

Readme

Source

Build Status

avg-stream

average the last n samples and emit the result as a stream

var avg = require('avg-stream');

var s = avg(2);

s.on('data',function(d){
  console.log(d);
})

s.write({a:1,b:2})
s.write({a:3,b:1})
s.write({a:2,b:4})

output

{ a: 1, b: 2 }
{ a: 2, b: 1.5 }
{ a: 2.5, b: 2.5 }

FAQs

Last updated on 18 Jan 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc