You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
528 B
23 lines
528 B
"use strict";
|
|
/**
|
|
* 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}
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
function isPlainHostName(host) {
|
|
return !/\./.test(host);
|
|
}
|
|
exports.default = isPlainHostName;
|
|
//# sourceMappingURL=isPlainHostName.js.map
|