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

Function getLocalSummaryStats

public/js/fileListView.js:4829–4843  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4827
4828
4829function getLocalSummaryStats() {
4830 const files = Array.isArray(fileData) ? fileData.length : 0;
4831 const bytes = Array.isArray(fileData)
4832 ? fileData.reduce((sum, file) => {
4833 const b = Number.isFinite(file.sizeBytes)
4834 ? file.sizeBytes
4835 : parseSizeToBytes(file.size || "");
4836 return sum + (Number.isFinite(b) && b > 0 ? b : 0);
4837 }, 0)
4838 : 0;
4839 const folders = Array.isArray(window.currentSubfolders)
4840 ? window.currentSubfolders.length
4841 : 0;
4842 return { folders, files, bytes };
4843}
4844
4845function buildFolderSummaryHTML(stats, fallback) {
4846 const safeTitle = (key, fallbackText) => {

Callers 2

loadFileListFunction · 0.85

Calls 1

parseSizeToBytesFunction · 0.85

Tested by

no test coverage detected