You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
321 B
JavaScript
11 lines
321 B
JavaScript
// used in report-size.yml
|
|
import { formatBytes } from './formatBytes.js';
|
|
|
|
const filesize = Number( process.argv[ 2 ] );
|
|
const filesizeBase = Number( process.argv[ 3 ] );
|
|
|
|
const diff = filesize - filesizeBase;
|
|
const formatted = `${diff >= 0 ? '+' : '-'}${formatBytes( Math.abs( diff ), 2 )}`;
|
|
|
|
console.log( formatted );
|