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