MCPcopy Create free account
hub / github.com/error311/FileRise / readStoredSpeed

Function readStoredSpeed

public/js/transferProgress.js:45–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45function readStoredSpeed() {
46 try {
47 const raw = parseFloat(localStorage.getItem(SPEED_STORAGE_KEY));
48 if (Number.isFinite(raw) && raw > 0) {
49 return clamp(raw, MIN_SPEED_BPS, MAX_SPEED_BPS);
50 }
51 } catch (e) { /* ignore */ }
52 return DEFAULT_SPEED_BPS;
53}
54
55function storeSpeed(bps) {
56 try {

Callers 2

estimateElapsedProgressFunction · 0.85
startTransferProgressFunction · 0.85

Calls 1

clampFunction · 0.85

Tested by

no test coverage detected