isObject
Functions to check the type of value if it's object.
isObject function
ts
function isObject(value: unknown): boolean
Checks if value is type of object and not null
.
Parameters
value: unknown
The value to check.
Return boolean
true
if value is an object, otherwise false
.
isPlainObject function
ts
function isPlainObject(value: unknown): boolean
Checks if value is a plain-object, created by object literal syntax ({ }
), or by invoking a constructor with prototype [object Object]
.
Parameters
value: unknown
The value to check.
Return boolean
true
if value is a plain-object, otherwise false
.