Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Rick Viscomi <[email protected]>
  • Loading branch information
kevinfarrugia and rviscomi authored Jan 19, 2024
1 parent 42d7e1f commit a2210b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dist/generated-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ let htmlAfter = document.documentElement.outerHTML;
if (htmlInitial && htmlAfter) {
let htmlInitialSize = byteSize(htmlInitial);
let htmlAfterSize = byteSize(htmlAfter);
generatedContentPercent = 100 - (htmlInitialSize / htmlAfterSize) * 100;
generatedContentPercent = 1 - (htmlInitialSize / htmlAfterSize);
generatedContent = (htmlAfterSize - htmlInitialSize) / 1024;
}

return JSON.stringify({
percent: generatedContentPercent.toFixed(2),
return {
percent: generatedContentPercent.toFixed(4),
sizeInKB: generatedContent.toFixed(2),
});
};

0 comments on commit a2210b0

Please sign in to comment.