Nodejs Object Value Get allProperties()

Here you can find the source of allProperties()

Method Source Code

Object.prototype.allProperties = function() {
    var prop,/*from   www .j  a  v a2 s. co m*/
        props = [];
        
    for(prop in this){
        if(this.hasOwnProperty(prop)){
            props.push(prop);
        }
    }

    return props;
};

Related

  1. values()
    Object.prototype.values = function() {
      var v = [];
      for (var p in this) {
        if (this.hasOwnProperty(p)) {
          v.push(this[p]);
      return v;
    };
    ...
    
  2. values(obj)
    Object.values = function(obj) { 
       return Object.keys(obj).map(function(key) { 
          return obj[key]; 
       }); 
    };
    
  3. hasValue(val)
    Object.prototype.hasValue = function(val){
      for (var key in this) {
        if (this.hasOwnProperty(key)) {
          if(this[key]==val){
            return true
      return false
    ...
    
  4. isEmpty(obj)
    Object.isEmpty = function(obj) {
      for (var i in obj) {
        return false;
      return true;