1.0.0 • Published 2 months ago
convert-file-size v1.0.0
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
1.0.0
2 months ago