0.2.0 • Published 8 years ago

unstable-stream v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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);
0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago