Tons of Solutions Engineering work done today for the rest of the CS team! Headway, Howard Hanna, Engels, Brighton, etc. Also completed Datasnippers auth flow and worked on Anthology's script. Cloned Anthology's courses (900..) and will clone Full Story on Monday.
This commit is contained in:
30
Scripts/node_modules/pac-resolver/dist/dnsDomainIs.js
generated
vendored
Normal file
30
Scripts/node_modules/pac-resolver/dist/dnsDomainIs.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Returns true iff the domain of hostname matches.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* ``` js
|
||||
* dnsDomainIs("www.netscape.com", ".netscape.com")
|
||||
* // is true.
|
||||
*
|
||||
* dnsDomainIs("www", ".netscape.com")
|
||||
* // is false.
|
||||
*
|
||||
* dnsDomainIs("www.mcom.com", ".netscape.com")
|
||||
* // is false.
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @param {String} host is the hostname from the URL.
|
||||
* @param {String} domain is the domain name to test the hostname against.
|
||||
* @return {Boolean} true iff the domain of the hostname matches.
|
||||
*/
|
||||
function dnsDomainIs(host, domain) {
|
||||
host = String(host);
|
||||
domain = String(domain);
|
||||
return host.substr(domain.length * -1) === domain;
|
||||
}
|
||||
exports.default = dnsDomainIs;
|
||||
//# sourceMappingURL=dnsDomainIs.js.map
|
||||
Reference in New Issue
Block a user