# Installation

You can install verifica into your project as a npm package. It is as simple as:

```
npm install verifica
```

*And voilà!*  Verifica is installed and ready to be used. Now to use it you need to import functionality, e.g.:

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

And use it:

```typescript
function sayHello(name) {
    const vname = asVerificable(name);
    ensure(vname, isString);
    
    console.log(`Hello ${name}!`);
}
```

Here we ensured that provided `name` argument is a string. To see what other checks (called `Predicates` in verifica) are available out of the box, please see the **Predicates** section of the documentation. Good news are, you can also easily create your own `Predicates` to satisfy your business logic checks!


---

# 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/getting-started/installation.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.
