pretty-file-bytes

1.0.0 • Public • Published

Install

$ npm install --save pretty-file-byte

Usage

const prettyByte = require('pretty-file-byte');

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

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

prettyByte(1020,'B');
//=> '1020 B'

prettyByte(1020,'KB');
//=> '1.02 KB'

Readme

Keywords

Package Sidebar

Install

npm i pretty-file-bytes

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • weiguoheng