danschultz / stream_transformers

A Dart package for transforming streams
MIT License
12 stars 9 forks source link

Add Throttle #17

Open danschultz opened 9 years ago

danschultz commented 9 years ago

Contain the last event from the source stream for each interval.

var stream = source.throttle(new Duration(seconds: 2));
stream.listen(print);

source:               abcde------abcde
source.throttled(2):  --b--d--e----b--d--e
danschultz commented 9 years ago

Depends on #18