1.0.2 • Published 6 months ago

bytes-human-readable v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

bytes-human-readable Version Badge

License Downloads

npm badge

Get the byte length of an ArrayBuffer, even in engines without a .byteLength method.

Example

const humanFileSize = require('bytes-human-readable');

console.log(humanFileSize(67229)); //67.2 KB
console.log(humanFileSize(67229, true, 2)); //67.23 KB
console.log(humanFileSize(67229, false)); //65.7 KiB

Tests

Simply clone the repo, npm install, and run npm test

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago