JS function for Node to mirror the exact png source code in HEX to a .txt file

Job ID: 34116616

Budget: $10 – $30 USD

I need a function in JavaScript for Node.js backend which is able to exactly convert a png to a hex code without manipulating, changing, reordering, etc the source code of the png and then write it to a txt file without spaces between hex values. You can use Notepad++ for example to convert a png to hex code and compare it with the result of your JS function.
Please provide an efficient and state-of-the-art JS code. Do not use bad rated (by Snyk), old, mini or not well maintained Node packages.

See two example png attached, one even converted to hex code (react.txt)
Related categories: JavaScript Node.js Image Processing