# hasProp

Takes a string defining a property name and returns a new function evaluation whether the received value (*can be of any type*) exists and has the defined property.

```javascript
import hasProp from 'deep-waters/hasProp';

const hasLength = hasProp('length');

hasLength({ length: true }); // → true
hasLength("Hello"); // → true
hasLength([1, 2, 3]); // → true
hasLength({ prop: 1 }); // → false
```

{% hint style="warning" %}
hasProp does not evaluate whether the received value is strictly of type [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object), it only makes sure it has the defined property
{% endhint %}
