/*
Used to determine if an object is empty by
iterating through each of it's keys to
see if a corresponding property exists.
*/
export default function isEmpty(obj) {
// For each key see if there is a corresponding property
for (const key in obj) {
// If there is at least 1 property return 'false', not empty
if (obj.hasOwnProperty(key)) {
return false;
}
}
// Otherwise the object is 'true' empty
return true;
}