Quantcast
Viewing latest article 2
Browse Latest Browse All 2

NodeJs get size of variable in bytes

I have a variable 'img' which is an image file that has been loaded via:

var img = fs.readFileSync('./tmp.png');

How do I determine how many bytes the 'img' variable is?


Viewing latest article 2
Browse Latest Browse All 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>