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

Function percDiff

dangerfile.js:71–77  ·  view source on GitHub ↗
(from, to)

Source from the content-addressed store, hash-verified

69};
70
71const percDiff = (from, to) => {
72 if (from === to) {
73 return '0%';
74 }
75
76 return `${maybePlus(from, to)}${(100 * (to - from) / (from || to)).toFixed(1)}%`;
77};
78
79const getSummary = (rows, totalMasterFileSize, totalFileSize) => {
80 const numFiles = rows.length;

Callers 2

getSummaryFunction · 0.85
runFunction · 0.85

Calls 1

maybePlusFunction · 0.85

Tested by

no test coverage detected