MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / getNetworkMultiplierFromString

Function getNetworkMultiplierFromString

src/WaitForHelper.ts:212–229  ·  view source on GitHub ↗
(
  condition: string | null,
)

Source from the content-addressed store, hash-verified

210}
211
212export function getNetworkMultiplierFromString(
213 condition: string | null,
214): number {
215 const puppeteerCondition =
216 condition as keyof typeof PredefinedNetworkConditions;
217
218 switch (puppeteerCondition) {
219 case 'Fast 4G':
220 return 1;
221 case 'Slow 4G':
222 return 2.5;
223 case 'Fast 3G':
224 return 5;
225 case 'Slow 3G':
226 return 10;
227 }
228 return 1;
229}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected