> 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/validators/equals.md).

# equals

Takes a value *val*, of any type, and returns a new function evaluating that the received value equals *val* (the one previously defined).

```javascript
const isHello = equals('hello');

isHello('hello'); // → true
isHello('lorem'); // → false


const isObj = equals({ foo: 'bar', deep: { prop: 1 } });

isObj({ foo: 'bar', deep: { prop: 1 }); // → true
isObj({ foo: 'ops', deep: { prop: 2 }); // → false
isObj('hello'); // → false
```
