# isObject

```typescript
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:

```typescript
{
    type: "isObject",
    path: [/* ... */]
}
```

### Examples:

Each of examples uses this import statement:

```typescript
const { asVerificable, isValid, isObject } = require("verifica");
```

#### Null or undefined is not considered an object:

```typescript
const verificable = asVerificable(null);
isValid(verificable, isObject); // false
```

#### String value is not considered an object as well:

```typescript
const verificable = asVerificable("123");
isValid(verificable, isObject); // false
```

#### Objects are matching:

```typescript
const verificable = asVerificable({ prop: "value" });
isValid(verificable, isObject); // true
```

#### Arrays are considered objects as well:

```typescript
const verificable = asVerificable(["a", "b"]);
isValid(verificable, isObject); // true
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://radoslaw-medryk.gitbook.io/verifica/predicates/built-in-predicates/isobject.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
