(source)
| 92 | } |
| 93 | |
| 94 | export function getRequestType(source) { |
| 95 | if (!source) return 'unknown'; |
| 96 | const lowerSource = source.toLowerCase(); |
| 97 | if (lowerSource.includes('xmlhttprequest')) return 'xhr'; |
| 98 | if (lowerSource.includes('fetch')) return 'fetch'; |
| 99 | if (lowerSource.includes('eventsource')) return 'eventsource'; |
| 100 | return 'unknown'; |
| 101 | } |
| 102 | |
| 103 | export function formatDuration(ms) { |
| 104 | const seconds = Math.floor(ms / 1000); |
no outgoing calls
no test coverage detected