Revive the properties of an object
@param {Object} object
@param {function} reviver
@return {Object}
18141
function reviveObject (object, reviver) {
  let revived = {};

  for (let key in object) {
    if (object.hasOwnProperty(key)) {
      revived[key] = reviveValue(object, key, object[key], reviver);
    }
  }

  return revived;
}
848368
function(object) {
      this._restoreObjectsState();
      removeFromArray(this.objects, object);
      object.setActive(false);
      this._calcBounds();
      this._updateObjectsCoords();
      return this;
    }
1033164
function (obj, options) {

            debug('Parsing properties...');
            debug('Object: %o', obj);

            Object.keys(obj)
                .map(key => {

                    let value = obj[key];

                    debug('Value: %o', value);

                    // parse current value
                    value = helpers.parseValue(value);

                    debug('Parsed value: %o', value);

                    // replace value with the updated one
                    obj[key] = value;
                });


            debug('Parsed options: %o', obj);

            return obj;
        }
1162965
function Property(path, node, scope, getObjectRef, file) {
  if (!node.method && node.kind === "init") return;
  if (!t.isFunction(node.value)) return;

  var replaceSupers = new _helpersReplaceSupers2["default"]({
    getObjectRef: getObjectRef,
    methodNode: node,
    methodPath: path,
    isStatic: true,
    scope: scope,
    file: file
  });

  replaceSupers.replace();
}
192534
function clone (obj){
	if(obj == null || typeof(obj) != 'object')
		return obj;

	var temp = obj.constructor();

	for(var key in obj)
		temp[key] = clone(obj[key]);
	return temp;
}
727357
function copyObject(obj) {
  var ret = {}, name;
  for (name in obj) {
    if (obj.hasOwnProperty(name)) {
      ret[name] = obj[name];
    }
  }
  return ret;
}
668977
function recurvsiveFlatten(name, obj, arr, depth){

  var type;

  // "items" property flags a nested object or array, so it needs special treatment
  if (obj.hasOwnProperty('items')) {

    type = obj.items.type;

    // Keep track of what type of array this is (if it is an array type)
    if (obj.type === 'array') {
      type = lodash.capitalize(type) + '[]';
    }

    // Add the object or array to the flattened property array
    arr.push({name: name, type: type, description: obj.description || '', depth: depth});

    // Loop thru the item's properties and execute the recursive function
    lodash.forIn(obj.items.properties, function (val, key) {
      recurvsiveFlatten(key, val, arr, depth + 1);
    });

  } else if (obj.hasOwnProperty('properties')) {

    // Add the object to the flattened property array
    arr.push({name: name, type: 'Object', description: obj.description || '', depth: depth});

    // Execute the recursive function on all properties
    lodash.forIn(obj.properties, function(val, key){
      recurvsiveFlatten(key, val, arr, depth + 1);
    });
  } else {

    // Add the property to the flattened property array
    arr.push({name: name, type: obj.type, description: obj.description, depth: depth});
  }

}
968142
function patch(obj, properties) {
  var old = {};
  for (var name in properties) {
    old[name] = obj[name];
    obj[name] = properties[name];
  }
  return old;
}
1141586
function getResetterObj (values, keys) {
  var resetterObj = {};

  (keys || Object.keys(values)).forEach(function (key) {
    if (values[key].resetter) {
      resetterObj[values[key].resetter] = key;
    }
  });

  return resetterObj;
}
839415
function (obj) {
		if (typeof obj !== "object" || obj === null) {
			return obj;
		}
		
		if (obj instanceof Date) {
			return new Date(obj.getTime());
		}
		
		if (obj instanceof RegExp) {
			return new RegExp(obj);
		}
		
		if (obj instanceof Array && Object.keys(obj).every(function (k) {
				return !isNaN(k);
			})) {
			return obj.slice(0);
		}
		var _obj = {};
		for (var attr in obj) {
			if (Object.hasOwnProperty.call(obj, attr)) {
				_obj[attr] = swagger.cloneObj(obj[attr]);
			}
		}
		return _obj;
	}
1069369
function clone(object, extend) {

  var cloned = {};

  for (var key in object) {
    cloned[key] = object[key];
  }

  for (var key in extend) {
    cloned[key] = extend[key];
  }

  return cloned;
}
3122
function(object) {
            // three special objects that we want to treat differently
            if(object == null) {
                return "null";
            }
            if(object.constructor == Date) {
                return this.serialize.date.apply(this, [object]);
            }
            if(object.constructor == Array) {
                return this.serialize.array.apply(this, [object]);
            }
            var pieces = ['{'];
            this.level += 1;
            var key, keyJSON, valueJSON;
            
            var addComma = false;
            for(key in object) {
                if(object.hasOwnProperty(key)) {
                    // recursive calls need to allow for sub-classing
                    keyJSON = OpenLayers.Format.JSON.prototype.write.apply(this,
                                                    [key, this.pretty]);
                    valueJSON = OpenLayers.Format.JSON.prototype.write.apply(this,
                                                    [object[key], this.pretty]);
                    if(keyJSON != null && valueJSON != null) {
                        if(addComma) {
                            pieces.push(',');
                        }
                        pieces.push(this.writeNewline(), this.writeIndent(),
                                    keyJSON, ':', this.writeSpace(), valueJSON);
                        addComma = true;
                    }
                }
            }
            
            this.level -= 1;
            pieces.push(this.writeNewline(), this.writeIndent(), '}');
            return pieces.join('');
        }
888609
function clone(object) {
  if (object === null || typeof object != "object") {
    return object;
  }
  const copy = object.constructor();
  for (const attr in object) {
    if (Object.prototype.hasOwnProperty.call(object, attr)) {
      copy[attr] = object[attr];
    }
  }

  return copy;
}
1171175
function restore(fn, obj) {
  var props = new Array(arguments.length - 2)
  var vals = new Array(arguments.length - 2)

  for (var i = 0; i < props.length; i++) {
    props[i] = arguments[i + 2]
    vals[i] = obj[props[i]]
  }

  return function(){
    // restore vals
    for (var i = 0; i < props.length; i++) {
      obj[props[i]] = vals[i]
    }

    return fn.apply(this, arguments)
  }
}
1069479
function updateObjectImpl(obj, update, isSelected) {
  if (isSelected(obj)) {
    return update(obj);
  }
  var result = obj;
  var changed = false;
  _lodash2.default.forOwn(obj, function (val, key) {
    var newval = updateValue(val, update, isSelected);
    if (newval === val) {
      return;
    }
    if (!changed) {
      result = _extends({}, obj);
      changed = true;
    }
    result[key] = newval;
  });
  return result;
}
387836
function createDryReplacer(root, replacer) {

	var value_paths = new WeakMap(),
	    seen_path,
	    flags = {is_root: true},
	    chain = [],
	    path = [],
	    temp,
	    last,
	    len;

	return function dryReplacer(holder, key, value) {

		// Process the value to a possible given replacer function
		if (replacer != null) {
			value = replacer.call(holder, key, value);
		}

		// All falsy values can be returned as-is
		if (!value) {
			return value;
		}

		let is_wrap;

		// An explicitly false key means this dryReplaced was
		// recursively called with a replacement object
		if (key === false) {
			key = '';
			is_wrap = true;

			// Wrappers get added to the object chain, but not the path
			// We need to be able to identify them later on
			holder.__is_wrap = true;

			// See if the wrapped value is an object
			if (holder[''] != null && typeof holder[''] === 'object') {
				holder.__is_object = true;
			}
		}

		switch (typeof value) {

			case 'function':
				// If no drier is created, return now.
				// Else: fall through
				if (!driers.Function) {
					return;
				}

			case 'object':
				value = replaceObject(dryReplacer, value, chain, flags, is_wrap, holder, path, value_paths, key);
				break;

			case 'string':
				// Make sure regular strings don't start with the path delimiter
				if (!flags.is_root && value[0] == '~') {
					value = safe_special_char + value.slice(1);
				}

				break;

			case 'number':
				// Allow infinite values
				if (value && !isFinite(value)) {
					if (value > 0) {
						value = {dry: '+Infinity'};
					} else {
						value = {dry: '-Infinity'};
					}
				}
				break;
		}

		return value;
	}
}
727260
function (s,reviver) {
        // Replace certain Unicode characters that are otherwise handled
        // incorrectly by some browser implementations.
        // NOTE: This modifies the input if such characters are found!
        s = s.replace(_UNICODE_EXCEPTIONS, _escapeException);
        
        // Test for any remaining invalid characters
        if (!_UNSAFE.test(s.replace(_ESCAPES,'@').
                            replace(_VALUES,']').
                            replace(_BRACKETS,''))) {

            // Eval the text into a JavaScript data structure, apply any
            // reviver function, and return
            return _revive( _eval('(' + s + ')'), reviver );
        }

        throw new SyntaxError('JSON.parse');
    }