MCPcopy Index your code
hub / github.com/coder/coder / normalizeUnitInterval

Function normalizeUnitInterval

site/src/utils/reconnectingWebSocket.ts:128–129  ·  view source on GitHub ↗
(value: number, fallback: number)

Source from the content-addressed store, hash-verified

126}
127
128const normalizeUnitInterval = (value: number, fallback: number): number =>
129 Number.isFinite(value) ? Math.min(Math.max(value, 0), 1) : fallback;
130
131const normalizeDelayMs = (value: number, fallback: number): number =>
132 Number.isFinite(value) ? Math.max(0, value) : fallback;

Callers 1

applyReconnectJitterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected