index.js
function processFile (data, lcov) {
  var lines = data.split(/\r?\n/)
  var currentCoverageFile = null

  for (var i = 0, l = lines.length; i < l; i++) {
    var line = lines[i]
    if (line === 'end_of_record' || line === '') {
      currentCoverageFile = null
      continue
    }

    var prefixSplit = line.split(':')
    var prefix = prefixSplit[0]

    switch (prefix) {
      case 'SF':
        currentCoverageFile = parseSF(lcov, prefixSplit)
        break
      case 'DA':
        parseDA(currentCoverageFile, prefixSplit)
        break
      case 'BRDA':
        parseBRDA(currentCoverageFile, prefixSplit)
        break
      default:
        // do nothing with not implemented prefixes
    }
  }
  return lcov
}
function processFile (data, lcov) {
  var lines = data.split(/\r?\n/)
  var currentCoverageFile = null

  for (var i = 0, l = lines.length; i < l; i++) {
    var line = lines[i]
    if (line === 'end_of_record' || line === '') {
      currentCoverageFile = null
      continue
    }

    var prefixSplit = line.split(':')
    var prefix = prefixSplit[0]

    switch (prefix) {
      case 'SF':
        currentCoverageFile = parseSF(lcov, prefixSplit)
        break
      case 'DA':
        parseDA(currentCoverageFile, prefixSplit)
        break
      case 'BRDA':
        parseBRDA(currentCoverageFile, prefixSplit)
        break
      default:
        // do nothing with not implemented prefixes
    }
  }
  return lcov
}
function processFile ( data , lcov ) { var lines = data . split ( / \r?\n / ) var currentCoverageFile = null for ( var i = 0 , l = lines . length ; i < l ; i ++ ) { var line = lines [ i ] if ( line === 'end_of_record' || line === '' ) { currentCoverageFile = null continue } var prefixSplit = line . split ( ':' ) var prefix = prefixSplit [ 0 ] switch ( prefix ) { case 'SF' : currentCoverageFile = parseSF ( lcov , prefixSplit ) break case 'DA' : parseDA ( currentCoverageFile , prefixSplit ) break case 'BRDA' : parseBRDA ( currentCoverageFile , prefixSplit ) break default : // do nothing with not implemented prefixes } } return lcov }
Process a lcov input file into the representing Objects

@param {string}         data
@param {CoverageFile[]} lcov

@returns {CoverageFile[]}
Process a lcov input file into the representing Objects