isObject
Verifies if provided Verificable
represents a value that is an object. Only non-null values for which typeof
operation provides "object"
result are matching, so string, number and other primitive values will not match this Predicate
.
The check internally is done by checking the type of the value typeof value === "object"
, however explicitly excluding null
as matching value.
That also means that functions are not matching this predicate, since for functions typeof
operation returns "function"
, but arrays are matching the predicate.
Possible errors:
If provided Verificable
is not an object:
Verificable
is not an object:Examples:
Each of examples uses this import statement:
Null or undefined is not considered an object:
String value is not considered an object as well:
Objects are matching:
Arrays are considered objects as well:
Last updated
Was this helpful?