convert-file-size

1.0.0 • Public • Published

convert-file-size

A lightweight Node.js package for file size conversion

Installation

npm install filesize-converter 

Usage

Here's an example of how to use the filesize-converter package:

// Require the filesize-converter package
const filesizeConverter = require('filesize-converter');

// Convert bytes to kilobytes
console.log(filesizeConverter.bytesToKilobytes(1024)); // Output: 1

// Convert bytes to megabytes
console.log(filesizeConverter.bytesToMegabytes(1048576)); // Output: 1

// Convert bytes to gigabytes
console.log(filesizeConverter.bytesToGigabytes(1073741824)); // Output: 1

License

License: Apache-2.0

Package Sidebar

Install

npm i convert-file-size

Weekly Downloads

4

Version

1.0.0

License

Apache-2.0

Unpacked Size

13.6 kB

Total Files

4

Last publish

Collaborators

  • nishar_khorajiya