Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@doodle/i18n / dist / state / saga / getCookieDomain.js
Size: Mime:
"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