![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets.corals.io/wp-content/themes/metras/node_modules/rxjs/_esm5/operator/ |
/** PURE_IMPORTS_START .._operators_take PURE_IMPORTS_END */ import { take as higherOrder } from '../operators/take'; /** * Emits only the first `count` values emitted by the source Observable. * * <span class="informal">Takes the first `count` values from the source, then * completes.</span> * * <img src="./img/take.png" width="100%"> * * `take` returns an Observable that emits only the first `count` values emitted * by the source Observable. If the source emits fewer than `count` values then * all of its values are emitted. After that, it completes, regardless if the * source completes. * * @example <caption>Take the first 5 seconds of an infinite 1-second interval Observable</caption> * var interval = Rx.Observable.interval(1000); * var five = interval.take(5); * five.subscribe(x => console.log(x)); * * @see {@link takeLast} * @see {@link takeUntil} * @see {@link takeWhile} * @see {@link skip} * * @throws {ArgumentOutOfRangeError} When using `take(i)`, it delivers an * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`. * * @param {number} count The maximum number of `next` values to emit. * @return {Observable<T>} An Observable that emits only the first `count` * values emitted by the source Observable, or all of the values from the source * if the source emits fewer than `count` values. * @method take * @owner Observable */ export function take(count) { return higherOrder(count)(this); } //# sourceMappingURL=take.js.map