()
| 122 | } |
| 123 | |
| 124 | private generateAnonymousId(): string { |
| 125 | // Generate a UUID v4 |
| 126 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { |
| 127 | const r = (Math.random() * 16) | 0; |
| 128 | const v = c === 'x' ? r : (r & 0x3) | 0x8; |
| 129 | return v.toString(16); |
| 130 | }); |
| 131 | } |
| 132 | |
| 133 | private generateSessionId(): string { |
| 134 | // Simple session ID based on timestamp and random value |
no outgoing calls
no test coverage detected