a zip code crypto-currency system good for red ONLY

skipLast.js 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /** PURE_IMPORTS_START .._operators_skipLast PURE_IMPORTS_END */
  2. import { skipLast as higherOrder } from '../operators/skipLast';
  3. /**
  4. * Skip the last `count` values emitted by the source Observable.
  5. *
  6. * <img src="./img/skipLast.png" width="100%">
  7. *
  8. * `skipLast` returns an Observable that accumulates a queue with a length
  9. * enough to store the first `count` values. As more values are received,
  10. * values are taken from the front of the queue and produced on the result
  11. * sequence. This causes values to be delayed.
  12. *
  13. * @example <caption>Skip the last 2 values of an Observable with many values</caption>
  14. * var many = Rx.Observable.range(1, 5);
  15. * var skipLastTwo = many.skipLast(2);
  16. * skipLastTwo.subscribe(x => console.log(x));
  17. *
  18. * // Results in:
  19. * // 1 2 3
  20. *
  21. * @see {@link skip}
  22. * @see {@link skipUntil}
  23. * @see {@link skipWhile}
  24. * @see {@link take}
  25. *
  26. * @throws {ArgumentOutOfRangeError} When using `skipLast(i)`, it throws
  27. * ArgumentOutOrRangeError if `i < 0`.
  28. *
  29. * @param {number} count Number of elements to skip from the end of the source Observable.
  30. * @returns {Observable<T>} An Observable that skips the last count values
  31. * emitted by the source Observable.
  32. * @method skipLast
  33. * @owner Observable
  34. */
  35. export function skipLast(count) {
  36. return higherOrder(count)(this);
  37. }
  38. //# sourceMappingURL=skipLast.js.map