NPM Needs: pretty-bytes
Andrew Usher

Andrew Usher @andrewusher

Location:
Memphis, TN
Joined:
Mar 11, 2021

NPM Needs: pretty-bytes

Publish Date: Apr 9 '22
5 0

Note: this was originally posted on my personal site

What Is It?

pretty-bytes is a utility used to convert an integer form of bytes to a more human readable form (bytes to kilobytes, for example). pretty-bytes-cli is a command line wrapper for the same package.

Usage Examples

import prettyBytes from 'pretty-bytes'

prettyBytes(100)
// '100 B'
prettyBytes(1650)
// '1.65 kB'
Enter fullscreen mode Exit fullscreen mode

More Info

Comments 0 total

    Add comment