Nearsighted Paramecium Multiverse

    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 .

    Install

    npm i pretty-size

    DownloadsWeekly Downloads

    65

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar