Filesize.js converts a raw file size value from bits to other more accessible formats.
So instead of seeing a file size value like 1500000000, a developer/reader can see it as 1.40GB instead.
This technique is considered a UX (user experience) recommended practice and should be used whenever possible.
As you can realize by yourself, usage implementations are endless.
The developer has access to some customization options:
- Enable bit sizes
- Enable Unix human readable format
- Set number base system
- Decimal place size
- Customize the spacers
- Customize the suffixes
What is new in this release:
- Refactored to ES6, with transpiling to ES5
- Reformatting `else` statements
What is new in version 3.0.0:
- Refactoring `filesize()` to output `Array` & `Object` shapes, & changing default `base` to `2`, reformatting code based on IDE settings (not included).
What is new in version 2.0.1:
- Adding language overriding via optional `suffixes` dictionary.
What is new in version 2.0.0:
- Major refactoring, API change.
What is new in version 1.9.5:
- Updated `.npmignore` file.
Requirements:
- Node.js 0.4 or higher
Comments not found