code: function clone(obj, json) {
      if (json)
          return JSON.parse(JSON.stringify(obj));
      return _clone(obj);
  }
docs: Clone
  Performs deep cloning of objects.
  
  @param obj object to be cloned.
  @param json performs quick shallow clone using JSON.