Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

humanize-data

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

humanize-data

Converts bytes to human readable format: 7338 → 7.17 KB

  • 1.3.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
66
decreased by-28.26%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 09 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc