@splode/obake
Version:
Check merchants for deals.
14 lines • 400 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* getHost returns the host from a given URL. For example, `"https://example.com"` would return `"example.com"`
*
* @param str A URL string
* @returns The URL's host
*/
function getHost(str) {
var u = new URL(str);
return u.hostname;
}
exports.default = getHost;
//# sourceMappingURL=url.js.map