@trandx/file-size-conversion
v3.1.1
Published
This utility provides a function to convert file sizes from bytes to human-readable units like KB, MB, GB, and TB.
Downloads
59
Readme
File Size Conversion Utility
This utility provides a function to convert file sizes from bytes to human-readable units like KB, MB, GB, and TB.
Table of Contents
Installation
pnpm add @trandx/file-size-conversion
or
npm i @trandx/file-size-conversion
Usage
import { fileSizeCoversion } from "@trandx/file-size-conversion"
// Example usage:
const fileSize = 2048000; // bytes
console.log(fileSizeCovertion(fileSize)) // Output: '2 MB'
If Issues
In case you notice any irregularities in benchmark or you want to add sort library to benchmark score please open issue here
Author
License
MIT