# Installation

**Deep Waters** is released under the [MIT license](https://raw.githubusercontent.com/antonioru/deep-waters/master/LICENSE) & supports modern environments.

You can install it by using **NPM**:

```bash
npm install deep-waters
```

**Deep Waters** exports its modules as [CommonJS](https://en.wikipedia.org/wiki/CommonJS) modules, so that each one can be easily imported individually, as the following:

```javascript
const compose = require('deep-waters/compose');
const minLength = require('deep-waters/minLength');
const ofUniqueItems = require('deep-waters/ofUniqueItems'); 

const arrayValidator = compose(minLength(3), ofUniqueItems);  

arrayValidator([1,2,3,4]); // => true;
```

Alternatively, it's possible to import all the modules at once with the same result.

```javascript
const DW = require('deep-waters');

const arrayValidator = DW.compose(DW.minLength(3), DW.ofUniqueItems);  

arrayValidator([1,2,3,4]); // => true;
```

### UMD/AMD modules

The node package contains both an UMD and an AMD version of the module:&#x20;

```javascript
const DWumd = require('deep-waters/deep-waters.umd');

// or

const DWamd = require('deep-waters/deep-waters.amd');
```


---

# 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://antonioru.gitbook.io/deep-waters/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.
