system_assignation/node_modules/pretty-bytes
2022-03-24 09:22:39 -04:00
..
node_modules add working version of ep_workflow 2022-03-24 09:22:39 -04:00
cli.js add working version of ep_workflow 2022-03-24 09:22:39 -04:00
license add working version of ep_workflow 2022-03-24 09:22:39 -04:00
package.json add working version of ep_workflow 2022-03-24 09:22:39 -04:00
pretty-bytes.js add working version of ep_workflow 2022-03-24 09:22:39 -04:00
readme.md add working version of ep_workflow 2022-03-24 09:22:39 -04:00

pretty-bytes Build Status

Convert bytes to a human readable string: 13371.34 kB

Useful for displaying file sizes for humans.

Note that it uses base-10 (eg. kilobyte).
Read about the difference between kilobyte and kibibyte.

Install

$ npm install --save pretty-bytes
$ bower install --save pretty-bytes
$ component install sindresorhus/pretty-bytes

Usage

prettyBytes(1337);
//=> '1.34 kB'

prettyBytes(100);
//=> '100 B'

CLI

$ npm install --global pretty-bytes
$ pretty-bytes --help

  Usage
    $ pretty-bytes <number>
    $ echo <number> | pretty-bytes

  Example
    $ pretty-bytes 1337
    1.34 kB

License

MIT © Sindre Sorhus