# 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
```
