raw-vs-rendered-html
v1.3.0
Published
A tool to compare the raw HTML of a website to the rendered HTML and see the differences in an output HTML file.
Downloads
4
Readme
raw-vs-rendered-html
A tool to compare the raw HTML of a website to the rendered HTML and see the differences in an output HTML file.
Installation
To install this package, run the following command:
npm install raw-vs-rendered-html
Usage
To use this package, require it in your code and call the rawVsRendered function, passing in a link to the website you want to compare and the desired output path for the resulting HTML file:
import rawVsRendered from "raw-vs-rendered-html";
rawVsRendered("https://www.example.com/", "output.html");
The resulting HTML file will contain a table with the raw HTML in one column and the rendered HTML in the other, with added lines highlighted in green and removed lines highlighted in red. There will also be buttons at the bottom of the page to navigate between the differences and a button at the top of the page to toggle between showing all lines and only showing the lines with differences.
Dependencies
This package depends on the following libraries:
axios
diff
fs
jsdom
License
This package is licensed under the MIT license.