function isCellSelected(cellLocation, selection) {
  if (!cellLocation || !selection) {
    return false;
  }

  switch (selection.type) {
    case 'column':
      return selection.type === 'column' && cellLocation.columnIndex === selection.columnIndex;

    case 'cell':
      return selection.type === 'cell' && cellLocation.sectionName === selection.sectionName && cellLocation.columnIndex === selection.columnIndex && cellLocation.rowIndex === selection.rowIndex;
  }
}
/**
 * Returns whether the cell at `cellLocation` is included in the selection `selection`.
 *
 * @param {Object} cellLocation An object containing cell location properties.
 * @param {Object} selection    An object containing selection properties.
 *
 * @return {boolean} True if the cell is selected, false otherwise.
 */
Returns whether the cell at `cellLocation` is included in the selection `selection`.
@param {Object} cellLocation An object containing cell location properties.
@param {Object} selection    An object containing selection properties.

@return {boolean} True if the cell is selected, false otherwise.
Returns whether the cell at ` cellLocation ` is included in the selection ` selection ` . @param { Object } cellLocation An object containing cell location properties . @param { Object } selection An object containing selection properties . @return { boolean } True if the cell is selected false otherwise .
function isCellSelected(cellLocation, selection) {
  if (!cellLocation || !selection) {
    return false;
  }
  switch (selection.type) {
    case 'column':
      return selection.type === 'column' && cellLocation.columnIndex === selection.columnIndex;
    case 'cell':
      return selection.type === 'cell' && cellLocation.sectionName === selection.sectionName && cellLocation.columnIndex === selection.columnIndex && cellLocation.rowIndex === selection.rowIndex;
  }
}
function isCellSelected ( cellLocation , selection ) { if ( ! cellLocation || ! selection ) { return false ; } switch ( selection . type ) { case 'column' : return selection . type === 'column' && cellLocation . columnIndex === selection . columnIndex ; case 'cell' : return selection . type === 'cell' && cellLocation . sectionName === selection . sectionName && cellLocation . columnIndex === selection . columnIndex && cellLocation . rowIndex === selection . rowIndex ; } }
Returns whether the cell at `cellLocation` is included in the selection `selection`.
Returns whether the cell at ` cellLocation ` is included in the selection ` selection ` .