function cellCoordFactory(axis, defaultIndex) {
  return function (cell) {
    return {
      row: axis === 'row' ? defaultIndex : cell.row,
      column: axis === 'column' ? defaultIndex : cell.column
    };
  };
}
Cell coordinates function factory.

@param {String} axis An axis name (`row` or `column`) which default index will be applied to.
@param {Number} defaultIndex Default index.
@returns {Function}