bufferToggle
signature: bufferToggle(openings: Observable, closingSelector: Function): Observable
bufferToggle(openings: Observable, closingSelector: Function): Observable
Toggle on to catch emitted values from source, toggle off to emit buffered values as array.
Examples
Example 1: Toggle buffer on and off at interval
( StackBlitz | jsBin | jsFiddle )
Example 2: Toggle buffer on and off on mouse down/up
( StackBlitz )
Additional Resources
:newspaper: - Official docs
:file_folder: Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/bufferToggle.ts
Last updated