tasks/lib/coverageStats.js
function addStats(collection, pkg) {
      var coverageType, stat;
      for (coverageType in collection) {
        if (collection.hasOwnProperty(coverageType)) {
          for (stat in collection[coverageType]) {
            if (collection[coverageType].hasOwnProperty(stat)) {
              collection[coverageType][stat] = collection[coverageType][stat] +
              pkg[coverageType][stat];
            }
          }
        }
      }
    }
function addStats(collection, pkg) {
      var coverageType, stat;
      for (coverageType in collection) {
        if (collection.hasOwnProperty(coverageType)) {
          for (stat in collection[coverageType]) {
            if (collection[coverageType].hasOwnProperty(stat)) {
              collection[coverageType][stat] = collection[coverageType][stat] +
              pkg[coverageType][stat];
            }
          }
        }
      }
    }
function addStats ( collection , pkg ) { var coverageType , stat ; for ( coverageType in collection ) { if ( collection . hasOwnProperty ( coverageType ) ) { for ( stat in collection [ coverageType ] ) { if ( collection [ coverageType ] . hasOwnProperty ( stat ) ) { collection [ coverageType ] [ stat ] = collection [ coverageType ] [ stat ] + pkg [ coverageType ] [ stat ] ; } } } } }
Helper function to append statistic properties from the provided collection to the provided package.json
@param {Object} collection - a collection of statistic properties
@param {Object} pkg - package.json object
Helper function to append statistic properties from the provided collection to the provided package . json