express check if object is empty

JavaScript
if(Object.keys(obj).length === 0) {

}//when this.state.errors object is empty 
if (Object.keys(this.state.errors).length == 0) {
  this.props.updateUser(user);
  this.props.navigation.goBack();
}
Source

Also in JavaScript: