bytes-human-readable

1.0.2 • Public • Published

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

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i bytes-human-readable

    Weekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    4.9 kB

    Total Files

    6

    Last publish

    Collaborators

    • siestacat