Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/.nvm/versions/node/v18.17.1/lib/node_modules/pm2/node_modules/pac-resolver/dist/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Is true if the hostname matches exactly the specified hostname, or if there is
* no domain name part in the hostname, but the unqualified hostname matches.
*
* Examples:
*
* ``` js
* localHostOrDomainIs("www.netscape.com", "www.netscape.com")
* // is true (exact match).
*
* localHostOrDomainIs("www", "www.netscape.com")
* // is true (hostname match, domain not specified).
*
* localHostOrDomainIs("www.mcom.com", "www.netscape.com")
* // is false (domain name mismatch).
*
* localHostOrDomainIs("home.netscape.com", "www.netscape.com")
* // is false (hostname mismatch).
* ```
*
* @param {String} host the hostname from the URL.
* @param {String} hostdom fully qualified hostname to match against.
* @return {Boolean}
*/
function localHostOrDomainIs(host, hostdom) {
const parts = host.split('.');
const domparts = hostdom.split('.');
let matches = true;
for (let i = 0; i < parts.length; i++) {
if (parts[i] !== domparts[i]) {
matches = false;
break;
}
}
return matches;
}
exports.default = localHostOrDomainIs;
//# sourceMappingURL=localHostOrDomainIs.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0054 ]-- |