(hostname: string)
| 1 | export const TRACKING_COOKIE_MAX_AGE_SECONDS = 60 * 60 * 24 * 365 * 10; |
| 2 | |
| 3 | export const extractRootDomain = (hostname: string): string => { |
| 4 | const host = hostname.split(':')[0]; |
| 5 | if (host === '127.0.0.1') { |
| 6 | return host; |
| 7 | } |
| 8 | const parts = host.split('.'); |
| 9 | while (parts.length > 2) { |
| 10 | parts.shift(); |
| 11 | } |
| 12 | return parts.join('.'); |
| 13 | }; |
no outgoing calls
no test coverage detected