Process object data

@param {object} data    Object data
@param {object} methods Getter methods
@returns {object} Processed data

@this {clazz|object}
505741
function self_method(data, methods) {
            if (!data) {
                return data;
            }

            var i, ii, prop;

            if (data.constructor === ({}).constructor) {
                for (prop in data) {
                    if (_.isUndefined(data[prop])) {
                        delete data[prop];
                        continue;
                    }

                    data[prop] = self_method(data[prop], methods);
                }
            }
            else if (_.isArray(data)) {
                for (i = 0, ii = data.length; i < ii; ++i) {
                    if (_.isUndefined(data[i])) {
                        --i; --ii;
                        continue;
                    }

                    data[i] = self_method(data[i], methods);
                }
            }
            else {

                methods = _.extend({}, methods, { __getData: null });

                _.each(methods, function(params, method) {

                    if (!_.isFunction(data[method])) {
                        return;
                    }

                    if (_.isNull(params) || _.isUndefined(params)) {
                        params = [];
                    }
                    if (!_.isArray(params)) {
                        params = [params];
                    }

                    data = data[method].apply(data, params);
                });
            }

            return data;
        }
492896
function(_data,_type){
        try{
            _type = _type.toLowerCase();
            if (_data===null) return _type=='null';
            if (_data===undefined) return _type=='undefined';
            return _o.toString.call(_data).toLowerCase()=='[object '+_type+']';
        }catch(e){
            return !1;
        }
    }
1300668
function(object, method) {
      if (object == null) return void 0;
      var func = object[method];
      var args = slice.call(arguments, 2);
      return _.isFunction(func) ? func.apply(object, args) : void 0;
    }
965645
function(object, methods) {
        _.each(methods, function(method, name) {
            if (!_.isFunction(method)) {
                throw new Error('Method "' + name + '" must be a function!');
            }
            object[name] = method
        });
    }
530598
function stringify(data){
		switch(typeof data){
			case 'string':
				return '"'+ data.replace(reg_rep, function(a){
					return rep[a];
				}) +'"';
			
			case 'object':
				if(data===null){return 'null'}
				var res = [], k, v;
				if(data instanceof Array){
					var l = data.length;
					for(k = 0; k < l; k++){
						v = stringify(data[k]);
						v===undef || res.push(v);
					}
					return '['+ res.join(',') +']';
				}else{
					for(k in data){
						if(data.hasOwnProperty(k) && k){
							v = stringify(data[k]);
							(jskw[k] || reg_d.test(k)) && (k = '"'+k+'"');
							v===undef || res.push(k +':'+ v);
						}
					}
					return '{'+ res.join(',') +'}';
				}

			case 'number':
				return isFinite(data) ? data.toString() : 'null';
			
			case 'undefined':
			case 'unknown':
				return;
			case 'function':
			case 'boolean':
			case 'regexp':
				return data.toString();
		}
	}
1368819
function getData(event) {
        var types = toArray(event.dataTransfer.types);

        return types.reduce(function (collection, type) {
          // Get data.
          var data = event.dataTransfer.getData(type);

          // Get data format.
          var format = /(.*)\//.exec(type);
          format = format ? format[1] : null;

          // Parse data.
          if (format === 'json') data = JSON.parse(data);

          collection[type] = data;

          return collection;
        }, {});
      }
92454
function ProcessDataChannelsResponse(jsonAnswer) {
    var data = JSON.parse(jsonAnswer);
    data = data.result;

    var channels = [];
    for (var deviceId in data) {
        if (data[deviceId] !== undefined) {
            channels = data[deviceId];
        }
    }

    /**
     * @property channels
     * @type {Array}
     */
    this.channels = channels;
}
950214
function(data){
		return typeof data === 'object' 
			? JSON.stringify(data) 
			: (typeof data === 'string' || typeof data === 'number' ? String(data) : null);
	}
563655
function (data) {
    var material = this.material;
    data = getMaterialData(data);
    Object.keys(data).forEach(function (key) {
      material[key] = data[key];
    });
  }
464144
function tableFromMethods(methodsArr) {
  const headers = ["Method Name", "Type", "Parameters", "Description"]
  let rows = []

  // construct rows of table array of methods
  methodsArr.forEach((method) => {
    let cols = []

    cols.push(method["name"]) // method name
    let paramList = ''
    method["params"].forEach((param) => {
      paramList += `${param["name"]}: ${param["type"]["name"]} - ${param["description"]}\n`
    })
    cols.push(paramList) // list of method parameters
    cols.push(`${method["description"]}`) // description of the method

    rows.push(cols);
  })
  
  return rows.length > 0 ? {table: {headers, rows}} : null
}
1225315
function modelMethod(model, method, data, done) {
  model[method](data).then(function(results) {
    done(null, results);
  })
  .catch(function(error) {
    // Try again on timeout
    if (error.message == "connect ETIMEDOUT") {
      modelMethod(model, method, data, done);
      return;
    }
    done(error);
  });
}
674919
function wrapQueryMethod(method) {
  Druid.prototype[method] = function(query, callback) {
    if (!this.ready) {
      var self = this
        , onready
        , onerror

      onready = function() {
        self.removeListener('error', onerror)
        self[method](query, callback)
      }

      onerror = function(err) {
        self.removeListener('ready', onready)
        callback(err)
      }

      this.once('ready', onready)
      this.once('error', onerror)

      return
    }

    var ds = query.dataSource()

    if (!this.dataSources.hasOwnProperty(ds)) {
      callback(new DruidError('No node serves data source: ' + ds))
    }
    else {
      var node = getLessLoaded(this, ds)

      node[method](query, callback)
    }
  }
}
713853
function(methods) {
    var keys = Object.keys(methods);
    var len = keys.length;
    for (var i = 0; i < len; i++) {
      var key = keys[i];
      this[key] = lib.method.createMethod(methods[key]);
    }
    return factory;
  }
371562
function getIgnoredMethods (methods) {
  var obj = Object.create(null)

  for (var i = 0; i < methods.length; i++) {
    var method = methods[i].toUpperCase()
    obj[method] = true
  }

  return obj
}
944423
function _mapDataValue(data, nestedSchema) {
    if (typeof nestedSchema === 'function') {
        return nestedSchema.apply(data);
    } else if (typeof nestedSchema === 'object') {
        return _map(data, nestedSchema);
    } else {
        return _getDataValue(data, nestedSchema);
    }
}
750886
function processData(store, attrs) {
      // List data
      if (attrs && attrs[0]) {
        StoreMemory.listByAttr(store, attrs[0]);
      }
      // Filter data if specified
      if (store.keys) {
        // Check keys format
        // Parse key object string to object
        store.keys =
          typeof store.keys === "string" ? eval("(" + store.keys + ")") : store.keys;
        // Call store filter
        StoreMemory.filter(store, store.keys);
      }
    }
692334
function process(services) {
            if (services == null || (typeof services === "undefined" ? "undefined" : _typeof(services)) !== "object") {
                throw new Error("Service definitions should be an object, a function returning an object (or a !!promise resolving to an object!!)");
            }
            var index = 0;
            var next = Object.keys(services)[index];
            return this.processKey(index, next, services).then(function () {
                return this;
            }.bind(this));
        }