function _parseCell(cell, rowIndex, colIndex) {
  const $cell = $(cell);
  const colspan = $cell.attr('colspan');
  const rowspan = $cell.attr('rowspan');
  const {nodeName} = cell;

  if (nodeName !== 'TH' && nodeName !== 'TD') {
    return null;
  }

  const cellData = {
    nodeName: cell.nodeName,
    colspan: colspan ? parseInt(colspan, 10) : 1,
    rowspan: rowspan ? parseInt(rowspan, 10) : 1,
    content: $cell.html(),
    elementIndex: {
      rowIndex,
      colIndex
    }
  };

  if (cell.nodeName === 'TH' && cell.align) {
    cellData.align = cell.align;
  }

  return cellData;
}
function _parseCell(cell, rowIndex, colIndex) {
  const $cell = $(cell);
  const colspan = $cell.attr('colspan');
  const rowspan = $cell.attr('rowspan');
  const {nodeName} = cell;

  if (nodeName !== 'TH' && nodeName !== 'TD') {
    return null;
  }

  const cellData = {
    nodeName: cell.nodeName,
    colspan: colspan ? parseInt(colspan, 10) : 1,
    rowspan: rowspan ? parseInt(rowspan, 10) : 1,
    content: $cell.html(),
    elementIndex: {
      rowIndex,
      colIndex
    }
  };

  if (cell.nodeName === 'TH' && cell.align) {
    cellData.align = cell.align;
  }

  return cellData;
}
function _parseCell ( cell , rowIndex , colIndex ) { const $cell = $ ( cell ) ; const colspan = $cell . attr ( 'colspan' ) ; const rowspan = $cell . attr ( 'rowspan' ) ; const { nodeName } = cell ; if ( nodeName !== 'TH' && nodeName !== 'TD' ) { return null ; } const cellData = { nodeName : cell . nodeName , colspan : colspan ? parseInt ( colspan , 10 ) : 1 , rowspan : rowspan ? parseInt ( rowspan , 10 ) : 1 , content : $cell . html ( ) , elementIndex : { rowIndex , colIndex } } ; if ( cell . nodeName === 'TH' && cell . align ) { cellData . align = cell . align ; } return cellData ; }
Parse cell like td or th.
@param {HTMLElement} cell - cell element like td or th
@param {number} rowIndex - row index
@param {number} colIndex - column index
@returns {{
nodeName: string,
colspan: number,
rowspan: number,
content: string,
align: ?string
}}
@private
Parse cell like td or th .
Parse cell data