Skip to content
0

katanakit-js / useIsObject

Function: useIsObject() ​

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

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

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

Parameters ​

ParameterType
itemunknown

Returns ​

item is Record<string, unknown>

Example ​

ts
useIsObject({ a: 1 }); // true

Released under the MIT License.