Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/node_modules/rxjs/operator/ |
Upload File : |
{"version":3,"file":"first.js","sourceRoot":"","sources":["../../src/operator/first.ts"],"names":[],"mappings":";AACA,sBAAqC,oBAAoB,CAAC,CAAA;AAuB1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAiD,SAAuE,EAC5F,cAAwD,EACxD,YAAgB;IAC1C,MAAM,CAAC,aAAW,CAAC,SAAS,EAAE,cAAqB,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3E,CAAC;AAJe,aAAK,QAIpB,CAAA","sourcesContent":["import { Observable } from '../Observable';\nimport { first as higherOrder } from '../operators/first';\n\n/* tslint:disable:max-line-length */\nexport function first<T, S extends T>(this: Observable<T>,\n predicate: (value: T, index: number, source: Observable<T>) => value is S): Observable<S>;\nexport function first<T, S extends T, R>(this: Observable<T>,\n predicate: (value: T | S, index: number, source: Observable<T>) => value is S,\n resultSelector: (value: S, index: number) => R, defaultValue?: R): Observable<R>;\nexport function first<T, S extends T>(this: Observable<T>,\n predicate: (value: T, index: number, source: Observable<T>) => value is S,\n resultSelector: void,\n defaultValue?: S): Observable<S>;\nexport function first<T>(this: Observable<T>,\n predicate?: (value: T, index: number, source: Observable<T>) => boolean): Observable<T>;\nexport function first<T, R>(this: Observable<T>,\n predicate: (value: T, index: number, source: Observable<T>) => boolean,\n resultSelector?: (value: T, index: number) => R,\n defaultValue?: R): Observable<R>;\nexport function first<T>(this: Observable<T>,\n predicate: (value: T, index: number, source: Observable<T>) => boolean,\n resultSelector: void,\n defaultValue?: T): Observable<T>;\n\n/**\n * Emits only the first value (or the first value that meets some condition)\n * emitted by the source Observable.\n *\n * <span class=\"informal\">Emits only the first value. Or emits only the first\n * value that passes some test.</span>\n *\n * <img src=\"./img/first.png\" width=\"100%\">\n *\n * If called with no arguments, `first` emits the first value of the source\n * Observable, then completes. If called with a `predicate` function, `first`\n * emits the first value of the source that matches the specified condition. It\n * may also take a `resultSelector` function to produce the output value from\n * the input value, and a `defaultValue` to emit in case the source completes\n * before it is able to emit a valid value. Throws an error if `defaultValue`\n * was not provided and a matching element is not found.\n *\n * @example <caption>Emit only the first click that happens on the DOM</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.first();\n * result.subscribe(x => console.log(x));\n *\n * @example <caption>Emits the first click that happens on a DIV</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.first(ev => ev.target.tagName === 'DIV');\n * result.subscribe(x => console.log(x));\n *\n * @see {@link filter}\n * @see {@link find}\n * @see {@link take}\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n *\n * @param {function(value: T, index: number, source: Observable<T>): boolean} [predicate]\n * An optional function called with each item to test for condition matching.\n * @param {function(value: T, index: number): R} [resultSelector] A function to\n * produce the value on the output Observable based on the values\n * and the indices of the source Observable. The arguments passed to this\n * function are:\n * - `value`: the value that was emitted on the source.\n * - `index`: the \"index\" of the value from the source.\n * @param {R} [defaultValue] The default value emitted in case no valid value\n * was found on the source.\n * @return {Observable<T|R>} An Observable of the first item that matches the\n * condition.\n * @method first\n * @owner Observable\n */\nexport function first<T, R>(this: Observable<T>, predicate?: (value: T, index: number, source: Observable<T>) => boolean,\n resultSelector?: ((value: T, index: number) => R) | void,\n defaultValue?: R): Observable<T | R> {\n return higherOrder(predicate, resultSelector as any, defaultValue)(this);\n}\n"]}