MCPcopy
hub / github.com/PrismJS/prism / getSummary

Function getSummary

dangerfile.js:79–86  ·  view source on GitHub ↗
(rows, totalMasterFileSize, totalFileSize)

Source from the content-addressed store, hash-verified

77};
78
79const getSummary = (rows, totalMasterFileSize, totalFileSize) => {
80 const numFiles = rows.length;
81 const maybeS = rows.length > 0 ? 's' : '';
82 const byteDiff = absDiff(totalMasterFileSize, totalFileSize);
83 const percentDiff = percDiff(totalMasterFileSize, totalFileSize);
84
85 return `A total of ${numFiles} file${maybeS} have changed, with a combined diff of ${byteDiff} (${percentDiff}).`;
86};
87
88const run = async () => {
89 const minified = await getChangedMinifiedFiles();

Callers 1

runFunction · 0.85

Calls 2

absDiffFunction · 0.85
percDiffFunction · 0.85

Tested by

no test coverage detected