Front end of the Slack clone application.

toArray.js 967B

123456789101112131415161718192021222324252627282930
  1. /** PURE_IMPORTS_START .._operators_toArray PURE_IMPORTS_END */
  2. import { toArray as higherOrder } from '../operators/toArray';
  3. /**
  4. * Collects all source emissions and emits them as an array when the source completes.
  5. *
  6. * <span class="informal">Get all values inside an array when the source completes</span>
  7. *
  8. * <img src="./img/toArray.png" width="100%">
  9. *
  10. * `toArray` will wait until the source Observable completes
  11. * before emitting the array containing all emissions.
  12. * When the source Observable errors no array will be emitted.
  13. *
  14. * @example <caption>Create array from input</caption>
  15. * const input = Rx.Observable.interval(100).take(4);
  16. *
  17. * input.toArray()
  18. * .subscribe(arr => console.log(arr)); // [0,1,2,3]
  19. *
  20. * @see {@link buffer}
  21. *
  22. * @return {Observable<any[]>|WebSocketSubject<T>|Observable<T>}
  23. * @method toArray
  24. * @owner Observable
  25. */
  26. export function toArray() {
  27. return higherOrder()(this);
  28. }
  29. //# sourceMappingURL=toArray.js.map