humanize-data

1.3.7 • Public • Published

humanize-data

Converts bytes to human readable format: 7338 → 7.17 KB

Installation

npm install humanize-data

Example

var humanizeData = require('humanize-data');
humanizeData(7378668345); //=> "6.87 GB"

Additional Options

By default, it humanize the bytes by 1024 multiplier. If you want to use a different multiplier such as 1000, you can use following code:

var humanizeData = require('humanize-data');
humanizeData(7378668345, { multiplier: 1000 }); //=> "7.38 GB"

Authors

  • Sprout Matrix - Enthusiast Developers - Website

License

This project is licensed under the MIT License.

Acknowledgments

  • JavaScript - The Awesome Language

Package Sidebar

Install

npm i humanize-data

Weekly Downloads

25

Version

1.3.7

License

MIT

Unpacked Size

2.42 kB

Total Files

3

Last publish

Collaborators

  • sprout.matrix