Skip to main content

readableBytesConverts a number of bytes to a human readable file size.### Parameters* bytes [number][1] of bytes to show

  • decimals [number][1]? optional number of decimals to show### Examples```javascript readableBytes(1234); // => 1.205078125 kB

readableBytes(1234, 2); // => 1.21 kB



* Source: [readable-bytes.ts](https://github.com/iamdevlinph/common-utils-pkg/blob/main/src/readable-bytes/readable-bytes.ts#L20-L30)