MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / getJsdelivrTotalSize

Function getJsdelivrTotalSize

website/src/lib/repo-provider.ts:365–375  ·  view source on GitHub ↗
(items: JsdelivrFile[])

Source from the content-addressed store, hash-verified

363}
364
365export function getJsdelivrTotalSize(items: JsdelivrFile[]): number {
366 let total = 0;
367 for (const item of items) {
368 if (item.type === "file" && item.size) {
369 total += item.size;
370 } else if (item.type === "directory" && item.files) {
371 total += getJsdelivrTotalSize(item.files);
372 }
373 }
374 return total;
375}
376
377export async function estimateZipSize(
378 ref: RepoRef,

Callers 1

estimateZipSizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected