true if the property exists, false otherwise
Error if input validation fails
const obj = { user: { name: 'Flavio Ever' } };
hasProp(obj, 'user.name'); // Returns true
hasProp(obj, 'user.age'); // Returns false
hasProp(obj, 'user.skills.0'); // Works with arrays
Checks if a property exists in an object using a dot-notation path