repeat.js 769 B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var operators_1 = require("rxjs/operators");
  4. /**
  5. * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times.
  6. *
  7. * <img src="./img/repeat.png" width="100%">
  8. *
  9. * @param {number} [count] The number of times the source Observable items are repeated, a count of 0 will yield
  10. * an empty Observable.
  11. * @return {Observable} An Observable that repeats the stream of items emitted by the source Observable at most
  12. * count times.
  13. * @method repeat
  14. * @owner Observable
  15. */
  16. function repeat(count) {
  17. if (count === void 0) { count = -1; }
  18. return operators_1.repeat(count)(this);
  19. }
  20. exports.repeat = repeat;
  21. //# sourceMappingURL=repeat.js.map