a zip code crypto-currency system good for red ONLY

skipLast.js 1.3KB

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