unstable-stream

0.2.0 • Public • Published

node-instable-stream

A stream detecting unstable behaviors.

var UnstableStream = require('unstable-stream');
 
// Create a new stream
// If data passed into the stream doesn't matches constraints,
// the 'instability' event will be emitted
var stream = new UnstableStream({
    max: 50, // Maximum value
    min: -60, // Minimum value
    maxDelta: 5, // Maximum distance between two values
    maxPeakDelta: 10 // Maximum distance between two peaks
});
 
stream.on('instability', function () {
    console.log('Instability detected!');
});
 
// Write numbers to the stream
stream.write(0);
stream.write(1);
stream.write(2);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i unstable-stream

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • emersion