marcusshepp
10/26/2016 - 1:08 PM

is object empty

is object empty

function is_empty(obj){
  return Object.keys(obj).length === 0;  
}

// alternative
 function isEmpty(object) { 
   for(var i in object) { 
      return true; 
    } 
  return false; 
}