1.0.1 • Published 7 years ago

pull-throttled v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

pull-throttled

A pull through stream that throttles the speed of the stream, just a utility.

Build Status

install

npm install pull-throttled --save

usage

var pull     = require('pull-stream');
var throttle = require('pull-throttled');

pull(
	pull.infinite(function () {
		return new Date();
	}),
	throttle (1000), // allow every second
	pull.log()
);

disclaimer

The throttle code is taken from an example from @Dominictarr but I did not see it on npm so I thought I would add it.