bytes-formater

1.0.4 • Public • Published

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

/bytes-formater/

    Package Sidebar

    Install

    npm i bytes-formater

    Weekly Downloads

    8

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    1.59 kB

    Total Files

    3

    Last publish

    Collaborators

    • gaurav07220