lib/Utils.js
function getCellData(column, rowData, rowNumber, tableData, columns, isBottomData) {
  var value = column.value;
  var id = column.id;

  // if it is bottom data, just use the value directly.

  if (isBottomData) {
    return rowData[id];
  }

  // call value as a function
  if (typeof value === 'function') {
    return value(rowData, { rowNumber: rowNumber, tableData: tableData, columns: columns });

    // interpret value as a key
  } else if (value != null) {
    return rowData[value];
  }

  // otherwise, use the ID as a key
  return rowData[id];
}
function getCellData(column, rowData, rowNumber, tableData, columns, isBottomData) {
  var value = column.value;
  var id = column.id;

  // if it is bottom data, just use the value directly.

  if (isBottomData) {
    return rowData[id];
  }

  // call value as a function
  if (typeof value === 'function') {
    return value(rowData, { rowNumber: rowNumber, tableData: tableData, columns: columns });

    // interpret value as a key
  } else if (value != null) {
    return rowData[value];
  }

  // otherwise, use the ID as a key
  return rowData[id];
}
function getCellData ( column , rowData , rowNumber , tableData , columns , isBottomData ) { var value = column . value ; var id = column . id ; // if it is bottom data, just use the value directly. if ( isBottomData ) { return rowData [ id ] ; } // call value as a function if ( typeof value === 'function' ) { return value ( rowData , { rowNumber : rowNumber , tableData : tableData , columns : columns } ) ; // interpret value as a key } else if ( value != null ) { return rowData [ value ] ; } // otherwise, use the ID as a key return rowData [ id ] ; }
Gets the value of a cell given the row data. If column.value is
a function, it gets called, otherwise it is interpreted as a
key to rowData. If column.value is not defined, column.id is
used as a key to rowData.

@param {Object} column The column definition
@param {Object} rowData The data for the row
@param {Number} rowNumber The number of the row
@param {Object[]} tableData The array of data for the whole table
@param {Object[]} columns The column definitions for the whole table
@return {Any} The value for this cell
Gets the value of a cell given the row data . If column . value is a function it gets called otherwise it is interpreted as a key to rowData . If column . value is not defined column . id is used as a key to rowData .