Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

compare-size

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compare-size

Compare size between two files

Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
55
-43.88%
Maintainers
1
Weekly downloads
 
Created
Source

compare-size Build Status

Compare size between two files

Install

$ npm install --save compare-size

Usage

const compareSize = require('compare-size');

compareSize('foo.zip', 'bar.zip').then(data => {
	console.log(data);
	//=> {foo.zip: 439, bar.zip: 325, difference: 114}
});

compareSize.sync('foo.zip', 'bar.zip');
//=> {foo.zip: 439, bar.zip: 325, difference: 114}

API

compareSize(a, b)

Compares size between two files. Returns a promise for an object with the stats difference.

a

Type: string

Path to the first file.

b

Type: string

Path to the second file.

CLI

$ npm install --global compare-size
$ compare-size --help

  Usage
    $ compare-size <file> <file>

  Example
    $ compare-size foo.zip bar.tar.gz

License

MIT © Kevin Mårtensson

Keywords

compare

FAQs

Package last updated on 11 Apr 2016

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