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 map_1 = require('./map'); /** * Maps each source value (an object) to its specified nested property. * * <span class="informal">Like {@link map}, but meant only for picking one of * the nested properties of every emitted object.</span> * * <img src="./img/pluck.png" width="100%"> * * Given a list of strings describing a path to an object property, retrieves * the value of a specified nested property from all values in the source * Observable. If a property can't be resolved, it will return `undefined` for * that value. * * @example <caption>Map every click to the tagName of the clicked target element</caption> * var clicks = Rx.Observable.fromEvent(document, 'click'); * var tagNames = clicks.pluck('target', 'tagName'); * tagNames.subscribe(x => console.log(x)); * * @see {@link map} * * @param {...string} properties The nested properties to pluck from each source * value (an object). * @return {Observable} A new Observable of property values from the source values. * @method pluck * @owner Observable */ function pluck() { var properties = []; for (var _i = 0; _i < arguments.length; _i++) { properties[_i - 0] = arguments[_i]; } var length = properties.length; if (length === 0) { throw new Error('list of properties cannot be empty.'); } return function (source) { return map_1.map(plucker(properties, length))(source); }; } exports.pluck = pluck; function plucker(props, length) { var mapper = function (x) { var currentProp = x; for (var i = 0; i < length; i++) { var p = currentProp[props[i]]; if (typeof p !== 'undefined') { currentProp = p; } else { return undefined; } } return currentProp; }; return mapper; } //# sourceMappingURL=pluck.js.map