Skip to content

Types

Identity functions that help with narrowing.

function isObject(variable): variable is Record<string, unknown>;

Defined in: functions/types.ts:13

Helper function to narrow an unknown value to an object (i.e., a TypeScript record).

Under the hood, this checks for typeof variable === "object", variable !== null, and !Array.isArray(variable).

Parameter Type
variable unknown

variable is Record<string, unknown>