Base utilities
Framework-agnostic functions for type checking and validation (isX/nonX/requireX), string, array, and object manipulation, and JSON/HTML handling. These do not depend on the Google Apps Script runtime.
A New marker indicates a function added in the latest release; a Deprecated marker indicates a function scheduled for removal in a future release.
Function | Return type | Brief description |
|---|---|---|
| Divides an array into multiple smaller arrays of a specified size. | |
|
| Drops every falsy value from an array, narrowing the element type without a cast. |
| Decodes HTML entities (e.g., | |
|
| Returns the interval between two dates in a chosen unit, counting calendar units by the calendar. |
| Encodes a string for safe rendering in HTML. | |
|
| Compares two values deeply and null-safely; the counterpart of |
| Escapes special characters ( | |
| Escapes special characters for safe use within regular expressions. | |
| Escapes special characters for safe use in XML documents. | |
|
| Takes the first element of an array, or its first |
|
| Flattens a nested object into a single level of dotted keys, keeping arrays whole. |
|
| Returns the number of calendar days in the month a given date falls in. |
| Returns the number of calendar days between a date and the end of its month. | |
|
| Reads a nested property by path, returning a fallback when the path does not resolve. |
| Generates a numeric hash code for a given string. | |
|
| Finds the values present in every given array, in the order of the first. |
| Validates if a value is a two-dimensional array. | |
| Validates if a value is an | |
| Validates if a value is a boolean. | |
| Validates if a 2D array has uniform inner array lengths. | |
| Checks if a value is a non-negative safe integer. | |
|
| Checks if a value is a finite number carrying a fractional part; a synonym of |
| Validates if a string follows a proper email format. | |
| Checks if a value is considered empty (null, undefined, empty string/array/object). | |
| Validates if a value is an instance of | |
|
| Checks if a value is a finite number carrying a fractional part. |
| Validates if a value is a function. | |
| Validates if a value is "function-like" (e.g., callable). | |
| Checks if a value is a number and an integer. | |
| Validates if a value is a valid array-like length. | |
|
| Checks if a value is the |
| Checks if a value is | |
|
| Checks if a value is a number greater than or equal to zero. |
| Checks if a value is | |
| Validates if a value is a number. | |
| Checks if a value can be reliably converted to a number. | |
| Validates if a value is a plain object (excluding null and arrays). | |
| Checks if a value is an object (including arrays and functions). | |
| Validates if a value is a regular expression. | |
|
| Checks if a value is a number and a safe integer (exactly representable as an IEEE-754 double). |
| Checks if a value is a primitive scalar type (string, number, boolean, symbol, bigint). | |
| Validates if a value is a string. | |
| Validates if a value is a symbol. | |
|
| Takes the last element of an array, or its last |
|
| Substitutes object values into |
|
| Validates if a value is not a finite number carrying a fractional part; a synonym of |
|
| Validates that the given value is a non-empty string. Use |
| Checks if a value is | |
| Validates if a string is a properly formatted URL. | |
| Validates if a string is a valid BCP 47 locale code. | |
| Validates if a string is a URL-friendly slug. | |
| Validates if a string follows Semantic Versioning rules. | |
| Determines if two version strings are compatible based on SemVer. | |
|
| Validates if a value is not a two-dimensional array. |
| Checks if a value is NOT an | |
| Checks if a value is NOT a boolean. | |
| Validates if a 2D array does not have uniform inner array lengths. | |
| Checks if a value is NOT empty. | |
|
| Validates if a value is not an instance of |
|
| Validates if a value is not a finite number carrying a fractional part. |
|
| Checks if a value is NOT a |
|
| Validates if a value is not a countable number (a non-negative safe integer). |
|
| Validates if a value is not "function-like" (e.g., callable). |
|
| Validates if a value is not a number and an integer. |
|
| Validates if a value is not a valid array-like length. |
|
| Validates if a value is not the |
| Checks if a value is NOT | |
| Checks if a value is NOT | |
|
| Checks if a value is a non-negative number. Use |
| Checks if a value is NOT a number. | |
|
| Validates if a value is not a number in a broader sense (e.g., a numeric string). |
|
| Validates if a value is not an |
|
| Validates if a value is not an object in a broader sense (functions included). |
|
| Validates if a value is not a regular expression. |
|
| Validates if a value is not a safe integer. |
| Checks if a value is NOT a scalar type. | |
| Checks if a value is NOT a string. | |
| Checks if a value is NOT a | |
| Checks if a value is NOT | |
|
| Validates if a value is not a properly formatted URL. |
|
| Validates if a string is not a properly formatted email address. |
|
| Validates if a string is not a valid locale code. |
|
| Validates if a string is not a valid slug. |
|
| Validates if a string is not a valid version. |
| Validates if one version is not compatible with (i.e. lower than) another. | |
| Returns the current timestamp in milliseconds. | |
| Enum representing | |
| Converts a value to its | |
|
| Shifts a date by an interval and returns a new |
|
| Safely parses a JSON string, handling potential errors. |
|
| Ensures a value is a non-empty two-dimensional array, throwing otherwise. |
|
| Ensures a value is an |
|
| Ensures a value is a boolean, throwing |
| Ensures a 2D array has uniform inner array lengths, throwing otherwise. | |
|
| Ensures a value is a countable number (a non-negative safe integer), throwing otherwise. |
|
| Ensures a value is a finite number carrying a fractional part, throwing otherwise; a synonym of |
|
| Ensures a value is empty, throwing |
|
| Ensures a value is an |
|
| Ensures a value is a finite number carrying a fractional part, throwing otherwise. |
|
| Ensures a value is a function, throwing |
| Ensures a value is callable in a broader sense, throwing | |
|
| Ensures a value is an integer, throwing |
|
| Ensures a value is a valid array-like length, throwing |
|
| Ensures a value is the |
|
| Ensures a value is |
|
| Ensures a value is not an |
| Ensures a value is not a boolean, throwing | |
|
| Ensures a value is not a finite number carrying a fractional part, throwing otherwise; a synonym of |
|
| Ensures a value is not empty, throwing |
|
| Ensures a value is not a finite number carrying a fractional part, throwing otherwise. |
| Ensures a value is not an integer, throwing otherwise. | |
|
| Ensures a value is not the |
| Ensures a value is not a safe integer, throwing otherwise. | |
| Ensures a value is a safe integer (exactly representable as an IEEE-754 double), throwing otherwise. | |
|
| Ensures a value is a |
| Ensures a string is not empty, otherwise throws an exception. | |
| Ensures a value is not an | |
| Ensures a value is not a function, throwing | |
| Ensures a value is not callable, throwing | |
| Throws | |
|
| Ensures a value is not a valid array-like length, throwing |
|
| Ensures a value is neither |
| Ensures a value is not | |
|
| Ensures a value is not a number, throwing |
| Ensures a value is not numeric in a broader sense, throwing | |
|
| Ensures a value is not an |
| Ensures a value is not object-like (functions included), throwing | |
|
| Ensures a value is not a regular expression, throwing |
|
| Ensures a value is not a scalar primitive, throwing |
|
| Ensures a value is not a string, throwing |
|
| Ensures a value is not a |
| Ensures a value is not | |
|
| Ensures a value is |
|
| Ensures a value is a number, throwing |
| Ensures a value is numeric in a broader sense (a number or a numeric string), throwing otherwise. | |
|
| Ensures a value is an |
| Ensures a value is object-like (functions included), throwing | |
|
| Ensures a value is a regular expression, throwing |
|
| Ensures a value is a scalar primitive, throwing |
|
| Throws |
| Ensures a value is a string, otherwise throws an exception. | |
|
| Ensures a value is |
|
| Ensures a value is a properly formatted URL, throwing otherwise. |
| Ensures a string is a valid email, otherwise throws an exception. | |
| Ensures a string is a valid locale code, throwing otherwise. | |
|
| Ensures a string is a valid slug, throwing otherwise. |
| Ensures a string is a valid version, throwing otherwise. | |
| Ensures one version is at least another, throwing otherwise. | |
|
| Calls a function until it succeeds, waiting longer between each failure. |
|
| Writes a nested property by path, creating missing levels and refusing prototype keys. |
|
| Times a sequence of named tasks and prints a breakdown. |
| Safely converts an object to a JSON string. | |
| Converts a string to | |
| Converts a value to an integer, returning | |
| Converts a string to | |
| Converts a string to lowercase. | |
| Converts a string to Proper Case (capitalizing the first letter of each word). | |
| Converts a string to | |
| Converts a string to uppercase. | |
| Flips a 2D array over its diagonal (swaps rows and columns). | |
|
| Removes duplicates from an array, keeping the first occurrence of each value. |
| Compares two version strings, returning -1, 0, or 1. | |
|
| Excludes the given values from an array, comparing with |
This documentation was generated with AI (Claude) from the library's source code.