Skip to main content

Types

Identity functions that help with narrowing.

Functions

isObject()

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

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).

Parameters

ParameterType
variableunknown

Returns

variable is Record<string, unknown>

Defined in

functions/types.ts:13