Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

compare-size

kevva498MIT3.0.0

Compare size between two files

compare, file, fs, size

readme

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.

License

MIT © Kevin Mårtensson