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

Function clamp

public/js/transferProgress.js:22–24  ·  view source on GitHub ↗
(n, min, max)

Source from the content-addressed store, hash-verified

20let _minimized = false;
21
22function clamp(n, min, max) {
23 return Math.max(min, Math.min(max, n));
24}
25
26function formatBytes(bytes) {
27 if (!Number.isFinite(bytes) || bytes < 0) return '0 B';

Callers 6

readStoredSpeedFunction · 0.85
estimateElapsedProgressFunction · 0.85
applyProgressBarFunction · 0.85
renderJobFunction · 0.85
updateTransferProgressFunction · 0.85
finishTransferProgressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected