-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathisRange.ts
More file actions
17 lines (16 loc) · 879 Bytes
/
isRange.ts
File metadata and controls
17 lines (16 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { isObject } from "../../lang";
/**
* Checks if the given value is a Google Apps Script <a href="https://developers.google.com/apps-script/reference/spreadsheet/range"><code>Range</code></a> object.
*
* @param {unknown} value - The value to check.
* @returns {boolean} `true` if the value is a <a href="https://developers.google.com/apps-script/reference/spreadsheet/range"><code>Range</code></a> object, `false` otherwise.
* @see {@link nonRange}
* @see {@link requireRange}
* @see <a href="https://developers.google.com/apps-script/reference/spreadsheet/range"><code>Range</code></a>
* @since 1.0.0
* @version 1.0.0
* @environment `Google Apps Script`, `Browser`
*/
export function isRange(value: unknown): value is GoogleAppsScript.Spreadsheet.Range {
return isObject(value) && value?.toString() === "Range";
}