> For the complete documentation index, see [llms.txt](https://radoslaw-medryk.gitbook.io/verifica/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://radoslaw-medryk.gitbook.io/verifica/functions/rawvalue.md).

# rawValue

```typescript
function rawValue(verificable): unknown
```

This function returns the raw value behind a `Verificable` object, without performing any checks on it.

This function is mainly useful when writing your own `Predicate` functions, to get the raw value out of the `Verificable` and perform necessary checks on it, returning `VerificaError` if value is not considered matching.

## Examples:

First, let's define an example object `product` that we want to verify and wrap it with `asVerificable():`

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

const product = {
    name: "Headphones",
    price: 1200,
};
const verificable = asVerificable(product);
```

Then, we can call `rawValue()` to get the raw value behind the `Verificable` object:

```typescript
rawValue(verificable); // { name: "Headphones", price: 1200 }
```

We can also call `rawValue()` for any of `Verificable` object properties, since they are always a `Verificable` objects as well, representing the deeper nested values:

```typescript
rawValue(verificable.name); // "Headphones"
```

Calling `rawValue()` on a `Verificable` representing missing value will result in `VerificaException`:

```typescript
rawValue(verificable.not.existing.path); // <throws VerificaException>
```
