1.0.4 • Published 1 year ago

bytes-formater v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

formatBytes

Overview

formatBytes is a lightweight utility function designed to convert bytes into human-readable file sizes. Whether you're working on a web application, a desktop program, or any other project that deals with file sizes, formatBytes can help you display them in a user-friendly format.

Installation

You can install formatBytes via npm:

npm install bytes-formater



## Usage --------------

import formatBytes from 'format-bytes';

const fileSize = 1024; // Example byte size
const formattedSize = formatBytes(fileSize);
console.log(formattedSize); // Output: '1 KB'
## How To Use