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