> For the complete documentation index, see [llms.txt](https://antonioru.gitbook.io/deep-waters/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://antonioru.gitbook.io/deep-waters/composition/or.md).

# or

Takes a list of validators $$\[validators]$$ then returns a new function that receives a value $$v$$(of any type) and reports whether the $$v$$ is valid for at least one of the previously defined $$\[validators]$$.

It is largely used within the library itself to evaluate or conditions:

{% code title="isPrimitive.js" %}

```javascript
import or from './or';
import isBigInt from './isBigInt';
import isString from './isString';
import isFunction from './isFunction';
import isBoolean from './isBoolean';
import isNumber from './isNumber';
import isSymbol from './isSymbol';
import isUndefined from './isUndefined';
import isNull from './isNull';

/**
 * Receives a value and reports whether it is a primitive of not
 * @type {function(*=): boolean}
 */
const isPrimitive = or(isString, isFunction, isBoolean, isNumber, isBigInt, isSymbol, isNull, isUndefined);

export default isPrimitive;
```

{% endcode %}

#### Related validators

{% content-ref url="/pages/-M6UnOFUFTxUoRqZRTcT" %}
[compose](/deep-waters/composition/compose.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6UnSCICpEyxZ9lypv8" %}
[when](/deep-waters/composition/when.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6UnanTnzxPY5GLxnUW" %}
[not](/deep-waters/composition/not.md)
{% endcontent-ref %}
