MCPcopy Create free account
hub / github.com/bywwcnll/StreamPanel / getRequestType

Function getRequestType

devtools/modules/utils.js:94–101  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

92}
93
94export 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
103export function formatDuration(ms) {
104 const seconds = Math.floor(ms / 1000);

Callers 2

getConnectionExportInfoFunction · 0.90
renderConnectionListFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected