/usr/local/lib/node_modules/pm2/node_modules/pac-resolver/dist
NameSizeModeActions
dateRange.d.ts22940644editdlrm
dateRange.d.ts.map2310644editdlrm
dateRange.js24220644editdlrm
dateRange.js.map2560644editdlrm
dnsDomainIs.d.ts6120644editdlrm
dnsDomainIs.d.ts.map2310644editdlrm
dnsDomainIs.js7900644editdlrm
dnsDomainIs.js.map3660644editdlrm
dnsDomainLevels.d.ts4460644editdlrm
dnsDomainLevels.d.ts.map2130644editdlrm
dnsDomainLevels.js6660644editdlrm
dnsDomainLevels.js.map3770644editdlrm
dnsResolve.d.ts4370644editdlrm
dnsResolve.d.ts.map2130644editdlrm
dnsResolve.js7700644editdlrm
dnsResolve.js.map4390644editdlrm
index.d.ts23080644editdlrm
index.d.ts.map18840644editdlrm
index.js35190644editdlrm
index.js.map21700644editdlrm
ip.d.ts2080644editdlrm
ip.d.ts.map2220644editdlrm
ip.js17480644editdlrm
ip.js.map15470644editdlrm
isInNet.d.ts9910644editdlrm
isInNet.d.ts.map2470644editdlrm
isInNet.js14360644editdlrm
isInNet.js.map5650644editdlrm
isPlainHostName.d.ts4180644editdlrm
isPlainHostName.d.ts.map2130644editdlrm
isPlainHostName.js5280644editdlrm
isPlainHostName.js.map2460644editdlrm
isResolvable.d.ts2580644editdlrm
isResolvable.d.ts.map1990644editdlrm
isResolvable.js5610644editdlrm
isResolvable.js.map3890644editdlrm
localHostOrDomainIs.d.ts8940644editdlrm
localHostOrDomainIs.d.ts.map2520644editdlrm
localHostOrDomainIs.js12400644editdlrm
localHostOrDomainIs.js.map5780644editdlrm
myIpAddress.d.ts4280644editdlrm
myIpAddress.d.ts.map1860644editdlrm
myIpAddress.js16580644editdlrm
myIpAddress.js.map9890644editdlrm
shExpMatch.d.ts7360644editdlrm
shExpMatch.d.ts.map2290644editdlrm
shExpMatch.js11200644editdlrm
shExpMatch.js.map5410644editdlrm
timeRange.d.ts11840644editdlrm
timeRange.d.ts.map2080644editdlrm
timeRange.js33390644editdlrm
timeRange.js.map23950644editdlrm
util.d.ts3060644editdlrm
util.d.ts.map3670644editdlrm
util.js5670644editdlrm
util.js.map5190644editdlrm
weekdayRange.d.ts14480644editdlrm
weekdayRange.d.ts.map3470644editdlrm
weekdayRange.js26620644editdlrm
weekdayRange.js.map15800644editdlrm
Edit: /usr/local/lib/node_modules/pm2/node_modules/pac-resolver/dist/weekdayRange.js (2662B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const util_1 = require("./util"); const weekdays = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']; /** * Only the first parameter is mandatory. Either the second, the third, or both * may be left out. * * If only one parameter is present, the function yeilds a true value on the * weekday that the parameter represents. If the string "GMT" is specified as * a second parameter, times are taken to be in GMT, otherwise in local timezone. * * If both wd1 and wd1 are defined, the condition is true if the current weekday * is in between those two weekdays. Bounds are inclusive. If the "GMT" parameter * is specified, times are taken to be in GMT, otherwise the local timezone is * used. * * Valid "weekday strings" are: * * SUN MON TUE WED THU FRI SAT * * Examples: * * ``` js * weekdayRange("MON", "FRI") * true Monday trhough Friday (local timezone). * * weekdayRange("MON", "FRI", "GMT") * same as above, but GMT timezone. * * weekdayRange("SAT") * true on Saturdays local time. * * weekdayRange("SAT", "GMT") * true on Saturdays GMT time. * * weekdayRange("FRI", "MON") * true Friday through Monday (note, order does matter!). * ``` * * * @param {String} wd1 one of the weekday strings. * @param {String} wd2 one of the weekday strings. * @param {String} gmt is either the string: GMT or is left out. * @return {Boolean} */ function weekdayRange(wd1, wd2, gmt) { let useGMTzone = false; let wd1Index = -1; let wd2Index = -1; let wd2IsGmt = false; if ((0, util_1.isGMT)(gmt)) { useGMTzone = true; } else if ((0, util_1.isGMT)(wd2)) { useGMTzone = true; wd2IsGmt = true; } wd1Index = weekdays.indexOf(wd1); if (!wd2IsGmt && isWeekday(wd2)) { wd2Index = weekdays.indexOf(wd2); } const todaysDay = getTodaysDay(useGMTzone); let result; if (wd2Index < 0) { result = todaysDay === wd1Index; } else if (wd1Index <= wd2Index) { result = valueInRange(wd1Index, todaysDay, wd2Index); } else { result = valueInRange(wd1Index, todaysDay, 6) || valueInRange(0, todaysDay, wd2Index); } return result; } exports.default = weekdayRange; function getTodaysDay(gmt) { return gmt ? new Date().getUTCDay() : new Date().getDay(); } // start <= value <= finish function valueInRange(start, value, finish) { return start <= value && value <= finish; } function isWeekday(v) { if (!v) return false; return weekdays.includes(v); } //# sourceMappingURL=weekdayRange.js.map