Exploring Unbuild's Code: Pretty-Bytes Package Uncovered
Discover pretty-bytes, a package that converts bytes to human-readable strings! Used in unbuild OSS project, it's a game-changer for reporting file sizes. npm install pretty-bytes and learn more about its usage!
For this week, I have been reading unbuild source code and found few packages that I have never seen before or used. I wanted to share some interesting packages that are used in these OSS projects so we can learn a thing or two ;) The following are discussed in this article: What is pretty-bytes? pretty-bytes usage in unbuild What is pretty-bytes? pretty-bytes is written by Sindre. It converts bytes to a human readable string: 1337 → 1.34 kB. Install npm install pretty-bytes Usage import prettyBytes from 'pretty-bytes'; prettyBytes(133...