/* eslint-disable camelcase */

/**
 * Checks if a range is a cell
 * @param {GoogleAppsScript.Spreadsheet.Range} range
 * @return {boolean}
 */
function isRangeACell_(range) {
  return !/:/.test(range.getA1Notation());
}

/**
 * Run the snippet
 */
function run_test() {
  const cell = SpreadsheetApp.getActive().getRange('B3');
  const range = SpreadsheetApp.getActive().getRange('B3:B4');
  const active = SpreadsheetApp.getActiveRange();
  console.log([cell, range, active].map(isRangeACell_));
}

/* eslint-disable camelcase */

/**
 * Checks if a range is a cell
 * @param {GoogleAppsScript.Spreadsheet.Range} range
 * @return {boolean}
 */
function isRangeACell_(range) {
  return !~range.getA1Notation().indexOf(':');
}

/**
 * Run the snippet
 */
function run_test() {
  const cell = SpreadsheetApp.getActive().getRange('B3');
  const range = SpreadsheetApp.getActive().getRange('B3:B4');
  const active = SpreadsheetApp.getActiveRange();
  console.log([cell, range, active].map(isRangeACell_));
}

Update is ceaal a reange
Update is ceaal a reange

Signed-off-by: Alex Ivanov <141a92417f71895e56c4a5da05f3e98fc78e2220@contributor.pw>
