code: function (obj, depth) {
      var clone = null;
  
      depth = (typeof depth !== 'undefined') ? depth : 1;
      if (typeof obj === 'undefined') return undefined;
      if (Utils.isString(obj)) {
        return obj;
      }
      else if (Utils.isDate(obj)) {
        return obj.getUTCFullYear() + '-' +
          pad(obj.getUTCMonth() + 1) + '-' +
          pad(obj.getUTCDate()) + 'T' +
          pad(obj.getUTCHours()) + ':' +
          pad(obj.getUTCMinutes()) + ':' +
          pad(obj.getUTCSeconds()) + '.' +
          String((obj.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5) +
          'Z';
      }
      if (depth <= 0) return '…';
  
      if (Utils.isArray(obj)) {
        clone = [];
        Utils.each(obj, function (val) {
          clone.push(copyObjectToDepth(val, depth-1));
        });
      }
      else if (Utils.isObject(obj)) {
        clone = {};
        Utils.each(obj, function (val, key) {
          clone[key] = copyObjectToDepth(val, depth-1);
        });
      }
      else if (Utils.isFunction(obj)) {
        clone = '[func]';
      }
      else {
        clone = obj;
      }
  
      return clone;
    }
docs: Inner function that clones an object up to a certain depth.
  
  The function removes cyclic dependencies (simply because it duplicates
  all keys and values), and drops functions. The returned object may thus
  be serialized using JSON.stringify.
  
  Continuation dots strings are used to replace values that are truncated.
  
  @function
  @param {Object} obj The object to copy
  @param {number} depth The depth
  @return {Object} A copy of the object at the specified depth