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 / src / state / saga / getCookieDomain.js
Size: Mime:
export 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}`;
};