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/browser-sync/dist/ |
Upload File : |
var utils = require("./utils"); /** * Apply the operators that apply to the 'file:changed' event * @param {Rx.Observable} subject * @param options * @return {Rx.Observable<{type: string, files: Array<any>}>} */ function fileChanges(subject, options) { var operators = [ { option: "reloadThrottle", fnName: "throttle" }, { option: "reloadDelay", fnName: "delay" } ]; var scheduler = options.getIn(["debug", "scheduler"]); /** * Create a stream buffered/debounced stream of events */ var initial = getAggregatedDebouncedStream(subject, options, scheduler); return applyOperators(operators, initial, options, scheduler) .map(function (items) { var paths = items.map(function (x) { return x.path; }); if (utils.willCauseReload(paths, options.get("injectFileTypes").toJS())) { return { type: "reload", files: items }; } return { type: "inject", files: items }; }); } module.exports.fileChanges = fileChanges; /** * Apply the operators that apply to the 'browser:reload' event * @param {Rx.Observable} subject * @param options * @returns {Rx.Observable} */ function applyReloadOperators(subject, options) { var operators = [ { option: "reloadDebounce", fnName: "debounce" }, { option: "reloadThrottle", fnName: "throttle" }, { option: "reloadDelay", fnName: "delay" } ]; return applyOperators(operators, subject, options, options.getIn(["debug", "scheduler"])); } module.exports.applyReloadOperators = applyReloadOperators; /** * @param items * @param subject * @param options * @param scheduler */ function applyOperators(items, subject, options, scheduler) { return items.reduce(function (subject, item) { var value = options.get(item.option); if (value > 0) { return subject[item.fnName].call(subject, value, scheduler); } return subject; }, subject); } /** * @param subject * @param options * @param scheduler */ function getAggregatedDebouncedStream(subject, options, scheduler) { return subject .filter(function (x) { return options.get("watchEvents").indexOf(x.event) > -1; }) .buffer(subject.debounce(options.get("reloadDebounce"), scheduler)); } //# sourceMappingURL=file-event-handler.js.map