Repository URL to install this package:
|
Version:
5.0.1 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = function _default() {
var hostname = window.location.hostname;
if (hostname === 'localhost') {
return hostname;
}
var domainParts = hostname.split('.'); // get the last 2 parts of a domain i.e. doodle.com
var mainDomain = domainParts.slice(domainParts.length - 2).join('.');
return ".".concat(mainDomain);
};
exports.default = _default;
//# sourceMappingURL=getCookieDomain.js.map