UNPKG

pac-resolver

Version:

Generates an asynchronous resolver function from a PAC file

20 lines 431 B
/** * True iff there is no domain name in the hostname (no dots). * * Examples: * * ``` js * isPlainHostName("www") * // is true. * * isPlainHostName("www.netscape.com") * // is false. * ``` * * @param {String} host The hostname from the URL (excluding port number). * @return {Boolean} */ export default function isPlainHostName(host) { return !/\./.test(host); } //# sourceMappingURL=isPlainHostName.js.map