pretty-size

2.0.0 • Public • Published

Build Status Coverage Status

Overview :

Display human readable file size .

Install

npm install pretty-size --save;

Example :

const {prettySize} = require('pretty-size');
// import {prettySize} from 'pretty-size'; // ES6/ES7
 
prettySize(454434343)
  //'433.4 MiB'
prettySize(454434343,true)
  //'454.4 MB'
prettySize(134343,true)
  //'134.3 kB'
prettySize(1024*1024)
  //'1.0 MiB'
prettySize(1024*1024*1024*1024,true)
  //'1.1 TB'
prettySize(1024*1024*1024*1024,false)
 

License:

MIT .

Dependencies (0)

    Dev Dependencies (37)

    Package Sidebar

    Install

    npm i pretty-size

    Weekly Downloads

    54

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • abdennour