build-system/tasks/size.js
/**
 * Mutates the rows in place and merges the minified file entry as well
 * as its unminified file entry counterpart.
 * @param {!Array<!Array>} rows
 * @param {string} minFilename
 * @param {string} maxFilename
 * @param {boolean} mergeNames
 */
Mutates the rows in place and merges the minified file entry as well
as its unminified file entry counterpart.
Mutates the rows in place and merges the minified file entry as well as its unminified file entry counterpart .
function normalizeRow(rows, minFilename, maxFilename, mergeNames) {
  var minIndex = findMaxIndexByFilename(rows, function(filename) {
    return filename == minFilename;
  });
  var maxIndex = findMaxIndexByFilename(rows, function(filename) {
    return filename == maxFilename;
  });
  if (maxIndex != -1 && minIndex != -1) {
    if (mergeNames) {
      rows[minIndex][FILENAME_POS] += ' / ' + rows[maxIndex][FILENAME_POS];
    }
    rows[minIndex].unshift(rows[maxIndex][MIN_FILE_SIZE_POS]);
    rows.splice(maxIndex, 1);
  }
}
function normalizeRow ( rows , minFilename , maxFilename , mergeNames ) { var minIndex = findMaxIndexByFilename ( rows , function ( filename ) { return filename == minFilename ; } ) ; var maxIndex = findMaxIndexByFilename ( rows , function ( filename ) { return filename == maxFilename ; } ) ; if ( maxIndex != - 1 && minIndex != - 1 ) { if ( mergeNames ) { rows [ minIndex ] [ FILENAME_POS ] += ' / ' + rows [ maxIndex ] [ FILENAME_POS ] ; } rows [ minIndex ] . unshift ( rows [ maxIndex ] [ MIN_FILE_SIZE_POS ] ) ; rows . splice ( maxIndex , 1 ) ; } }
Mutates the rows in place and merges the minified file entry as well
 as its unminified file entry counterpart.
Mutates the rows in place and merges the minified file entry as well as its unminified file entry counterpart .