MCPcopy Create free account
hub / github.com/DavidWells/analytics / getSizeInfo

Function getSizeInfo

scripts/getSize.js:34–47  ·  view source on GitHub ↗
(code, filename)

Source from the content-addressed store, hash-verified

32}
33
34async function getSizeInfo(code, filename) {
35 const raw = code.length < 5000
36 const gzip = await gzipSize(code)
37 const brotli = await brotliSize(code)
38 const gzipLog = formatSize(gzip, filename, 'gz', raw)
39 const brotliLog = formatSize(brotli, filename, 'br', raw)
40 return {
41 size: formatBytes(gzip),
42 gzip: pretty(gzip, raw),
43 brotli: pretty(brotli, raw),
44 gzipLog,
45 brotliLog
46 }
47}
48
49module.exports = {
50 getSizeInfo

Callers 1

docs.jsFile · 0.85

Calls 3

formatSizeFunction · 0.85
formatBytesFunction · 0.85
prettyFunction · 0.85

Tested by

no test coverage detected