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

Function readCryptoEstimateSpeed

public/js/folderManager.js:3014–3022  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3012}
3013
3014function readCryptoEstimateSpeed() {
3015 try {
3016 const raw = parseFloat(localStorage.getItem(CRYPTO_SPEED_STORAGE_KEY));
3017 if (Number.isFinite(raw) && raw > 0) {
3018 return clampNum(raw, CRYPTO_MIN_SPEED_BPS, CRYPTO_MAX_SPEED_BPS);
3019 }
3020 } catch (e) { /* ignore */ }
3021 return CRYPTO_DEFAULT_SPEED_BPS;
3022}
3023
3024function estimateCryptoProgress(totalBytes, doneBytes, elapsedMs) {
3025 if (!Number.isFinite(totalBytes) || totalBytes <= 0) return null;

Callers 1

estimateCryptoProgressFunction · 0.85

Calls 1

clampNumFunction · 0.85

Tested by

no test coverage detected