1.0.2 • Published 2 years ago

bytes-human-readable v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago