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

Function absDiff

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

Source from the content-addressed store, hash-verified

61const maybePlus = (from, to) => from < to ? '+' : '';
62
63const absDiff = (from, to) => {
64 if (from === to) {
65 return formatBytes(0);
66 }
67
68 return `${maybePlus(from, to)}${formatBytes(to - from)}`;
69};
70
71const percDiff = (from, to) => {
72 if (from === to) {

Callers 2

getSummaryFunction · 0.85
runFunction · 0.85

Calls 2

formatBytesFunction · 0.85
maybePlusFunction · 0.85

Tested by

no test coverage detected