MCPcopy Create free account
hub / github.com/epicweb-dev/react-suspense / getDelay

Function getDelay

shared/ship-api-utils.server.ts:25–30  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

23 ).padStart(2, '0')}.${String(date.getMilliseconds()).padStart(3, '0')}`
24
25function getDelay(request: Request) {
26 return Number(
27 new URL(request.url).searchParams.get('delay') ||
28 Math.random() * (MAX_DELAY - MIN_DELAY) + MIN_DELAY,
29 )
30}
31
32export async function searchShips(request: Request) {
33 const url = new URL(request.url)

Callers 3

searchShipsFunction · 0.85
getShipFunction · 0.85
createShipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected