Skip to content

Commit

Permalink
feat(Stream): add debounce to Stream prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS authored and Andre Medeiros committed Mar 28, 2016
1 parent 7dfb709 commit f44b819
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {LastOperator} from './operator/LastOperator';
import {StartWithOperator} from './operator/StartWithOperator';
import {FlattenOperator} from './operator/FlattenOperator';
import {FlattenConcurrentlyOperator} from './operator/FlattenConcurrentlyOperator';
import {DebounceOperator} from './operator/DebounceOperator';
import {
CombineProducer,
CombineInstanceSignature,
Expand Down Expand Up @@ -216,6 +217,10 @@ export class Stream<T> implements InternalListener<T> {
return <T> new Stream<R>(new FlattenConcurrentlyOperator(<Stream<Stream<R>>> (<any> this)));
}

debounce(period: number): Stream<T> {
return new Stream<T>(new DebounceOperator(period, this));
}

merge(other: Stream<T>): Stream<T> {
return Stream.merge(this, other);
}
Expand Down

0 comments on commit f44b819

Please sign in to comment.