An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
April 9, 2022 10:31 pm GMT
Original Link: https://dev.to/andrewusher/npm-needs-pretty-bytes-4h56
NPM Needs: pretty-bytes
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'
More Info
- Github Repo: sindresorhus/pretty-bytes
- Author: Sindre Sorhus
Original Link: https://dev.to/andrewusher/npm-needs-pretty-bytes-4h56
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To