@trandx/file-size-conversion
TypeScript icon, indicating that this package has built-in type declarations

3.1.1 • Public • Published

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.

NPM

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

alt text

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @trandx/file-size-conversion

Weekly Downloads

1

Version

3.1.1

License

MIT

Unpacked Size

2.28 kB

Total Files

4

Last publish

Collaborators

  • trandx