helpers/helpers.js
function tableRow () {
  var args = arrayify(arguments)
  var rows = args.shift()
  if (!rows) return
  var options = args.pop()
  var cols = args
  var output = ''

  if (options.data) {
    var data = handlebars.createFrame(options.data)
    cols.forEach(function (col, index) {
      var colNumber = index + 1
      data['col' + colNumber] = containsData(rows, col)
    })
  }
  rows.forEach(function (row) {
    output += options.fn(row, { data: data })
  })
  return output
}
function tableRow () {
  var args = arrayify(arguments)
  var rows = args.shift()
  if (!rows) return
  var options = args.pop()
  var cols = args
  var output = ''

  if (options.data) {
    var data = handlebars.createFrame(options.data)
    cols.forEach(function (col, index) {
      var colNumber = index + 1
      data['col' + colNumber] = containsData(rows, col)
    })
  }
  rows.forEach(function (row) {
    output += options.fn(row, { data: data })
  })
  return output
}
function tableRow ( ) { var args = arrayify ( arguments ) var rows = args . shift ( ) if ( ! rows ) return var options = args . pop ( ) var cols = args var output = '' if ( options . data ) { var data = handlebars . createFrame ( options . data ) cols . forEach ( function ( col , index ) { var colNumber = index + 1 data [ 'col' + colNumber ] = containsData ( rows , col ) } ) } rows . forEach ( function ( row ) { output += options . fn ( row , { data : data } ) } ) return output }
returns a gfm table row.. only columns which contain data are included in the output
returns a gfm table row .. only columns which contain data are included in the output