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/operators/ |
Upload File : |
"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = require('../Subscriber'); var Notification_1 = require('../Notification'); /** * Represents all of the notifications from the source Observable as `next` * emissions marked with their original types within {@link Notification} * objects. * * <span class="informal">Wraps `next`, `error` and `complete` emissions in * {@link Notification} objects, emitted as `next` on the output Observable. * </span> * * <img src="./img/materialize.png" width="100%"> * * `materialize` returns an Observable that emits a `next` notification for each * `next`, `error`, or `complete` emission of the source Observable. When the * source Observable emits `complete`, the output Observable will emit `next` as * a Notification of type "complete", and then it will emit `complete` as well. * When the source Observable emits `error`, the output will emit `next` as a * Notification of type "error", and then `complete`. * * This operator is useful for producing metadata of the source Observable, to * be consumed as `next` emissions. Use it in conjunction with * {@link dematerialize}. * * @example <caption>Convert a faulty Observable to an Observable of Notifications</caption> * var letters = Rx.Observable.of('a', 'b', 13, 'd'); * var upperCase = letters.map(x => x.toUpperCase()); * var materialized = upperCase.materialize(); * materialized.subscribe(x => console.log(x)); * * // Results in the following: * // - Notification {kind: "N", value: "A", error: undefined, hasValue: true} * // - Notification {kind: "N", value: "B", error: undefined, hasValue: true} * // - Notification {kind: "E", value: undefined, error: TypeError: * // x.toUpperCase is not a function at MapSubscriber.letters.map.x * // [as project] (http://1…, hasValue: false} * * @see {@link Notification} * @see {@link dematerialize} * * @return {Observable<Notification<T>>} An Observable that emits * {@link Notification} objects that wrap the original emissions from the source * Observable with metadata. * @method materialize * @owner Observable */ function materialize() { return function materializeOperatorFunction(source) { return source.lift(new MaterializeOperator()); }; } exports.materialize = materialize; var MaterializeOperator = (function () { function MaterializeOperator() { } MaterializeOperator.prototype.call = function (subscriber, source) { return source.subscribe(new MaterializeSubscriber(subscriber)); }; return MaterializeOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var MaterializeSubscriber = (function (_super) { __extends(MaterializeSubscriber, _super); function MaterializeSubscriber(destination) { _super.call(this, destination); } MaterializeSubscriber.prototype._next = function (value) { this.destination.next(Notification_1.Notification.createNext(value)); }; MaterializeSubscriber.prototype._error = function (err) { var destination = this.destination; destination.next(Notification_1.Notification.createError(err)); destination.complete(); }; MaterializeSubscriber.prototype._complete = function () { var destination = this.destination; destination.next(Notification_1.Notification.createComplete()); destination.complete(); }; return MaterializeSubscriber; }(Subscriber_1.Subscriber)); //# sourceMappingURL=materialize.js.map