Saltar al contenido principal

Function: useIsObject()

useIsObject(item): item is Record<string, unknown>

Defined in: src/core/services/utils.service.ts:94

Type guard that checks whether a value is a plain object (not null, not an array).

Parameters

item

unknown

The value to test.

Returns

item is Record<string, unknown>

true if the value is a plain Record<string, unknown>.

Example

useIsObject({ a: 1 }); // true
useIsObject([1, 2]); // false
useIsObject(null); // false
useIsObject("hello"); // false