This utility provides a function to convert file sizes from bytes to human-readable units like KB, MB, GB, and TB.
pnpm add @trandx/file-size-conversion
or
npm i @trandx/file-size-conversion
import { fileSizeCoversion } from "@trandx/file-size-conversion"
// Example usage:
const fileSize = 2048000; // bytes
console.log(fileSizeCovertion(fileSize)) // Output: '2 MB'
In case you notice any irregularities in benchmark or you want to add sort library to benchmark score please open issue here
MIT