Socket
Book a DemoInstallSign in
Socket

convert-file-size

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-file-size

A lightweight Node.js package for file size conversion

1.1.0
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

convert-file-size

A lightweight Node.js package for file size conversion

Installation

npm install convert-file-size 

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

Keywords

file-size-conversion

FAQs

Package last updated on 09 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.