buffer
signature: buffer(closingNotifier: Observable): Observable
buffer(closingNotifier: Observable): Observable
Collect output values until provided observable emits, emit as array.
Examples
Example 1: Using buffer to recognize double clicks
( StackBlitz)
Example 2: Buffer until document click
( StackBlitz | jsBin | jsFiddle )
Related Recipes
Additional Resources
buffer :newspaper: -
Official docs
Transformation operator: buffer
:video_camera: :dollar: - André Staltz
:file_folder: Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/buffer.ts
Last updated