Skip to content

Convert HTML to Pug in Node.js

We can use the¬†html2pug¬†npm package to convert HTML to Pug in JavaScript / Node.js. The fragment option tells html2pug whether […]

Get file size in Node.js

To get file size in Node.js, the following code snippet would help. statSync() method from fs package synchronously returns information […]