Clone a field of a filter (array, object or any primary type)
@param  {*} v - Value to clone
@return {*} Cloned value
769463
function cloneField (v) {
  if (v === null || v === undefined) {
    return v
  } if (Array.isArray(v)) {
    return v.map(cloneField)
  } else if (typeof v === 'object') {
    if ('saveAsJSON' in v) {
      return v.saveAsJSON()
    }
    return Object.assign({}, v)
  }
  return v
}
139860
function() {

			// covert the values array into an array of filter objects
			var aFilters = [];
			for (var i = 0, l = this.aValues && this.aValues.length || 0; i < l; i++) {
				aFilters.push(new Filter({
					path: this.sPath,
					operator: this.aValues[i].operator,
					value1: this.aValues[i].value1,
					value2: this.aValues[i].value2
				}));
			}

			// create the new filter object based on the filters
			if (aFilters.length > 1) {
				var oFilter = new Filter({
					filters: aFilters,
					and: this.bAND
				});

				return oFilter;
			} else {
				return aFilters[0];
			}

		}
1358969
function clone (obj, deep) {
  if (obj) {
    return deep ? deepClone(obj) : objectAssign(isPlainObject(obj) ? {} : [], obj)
  }
  return obj
}
963467
function cloneObject(source)
{
	var clone,key,value;
	
	if (Array.isArray(source) === true)
	{
		clone = [];
	}
	else
	{
		// Only clone the prototype -- more efficient as it will not convert keys to prototype keys
		clone = Object.create( Object.getPrototypeOf(source) );
	}
	
	// Clone keys/indexes
	// TODO :: use Object.keys() for more speed
	for (key in source)
	{
		if (hasOwnProperty.call(source, key) === true)
		{
			value = source[key];
			
			if (value!==null && typeof value==="object")
			{
				clone[key] = cloneObject(value);
			}
			else
			{
				clone[key] = value;
			}
		}
	}
	
	return clone;
}
648051
function cloneWrap(obj, circularValue) {
  circularValue = safeDeepClone(undefined, [], circularValue);
  return safeDeepClone(circularValue, [], obj);
}
1244507
function() {
        var options = OpenLayers.Util.applyDefaults({
            value: this.value && this.value.clone && this.value.clone()
        }, this);
        return new OpenLayers.Filter.Spatial(options);
    }
1218712
public static Field cloneField(Field field) {
    return new Field(field.name(), field.schema(), field.doc(),
        field.defaultValue());
  }
645680
function clone(source) {
            if (!source || typeof source !== 'object') {
                return source;
            }

            var cloned = source;

            if (isArray(source)) {
                cloned = source.slice().map(clone);
            }
            else if (isObject(source) && 'isPrototypeOf' in source) {
                cloned = {};
                for (var key in source) {
                    if (hasOwnProperty.call(source, key)) {
                        cloned[key] = clone(source[key]);
                    }
                }
            }

            return cloned;
        }
15714
function clone(collection, deep = true) {
		const clones = new Jamon();

		collection.forEach(element => clones.push(element.cloneNode(deep)));

		return clones;
	}
497764
function cloneVNode (vnode) {
  const cloned = new VNode(
    vnode.tag,
    vnode.data,
    // #7975
    // clone children array to avoid mutating original in case of cloning
    // a child.
    vnode.children && vnode.children.slice(),
    vnode.text,
    vnode.elm,
    vnode.context,
    vnode.componentOptions,
    vnode.asyncFactory
  );
  cloned.ns = vnode.ns;
  cloned.isStatic = vnode.isStatic;
  cloned.key = vnode.key;
  cloned.isComment = vnode.isComment;
  cloned.fnContext = vnode.fnContext;
  cloned.fnOptions = vnode.fnOptions;
  cloned.fnScopeId = vnode.fnScopeId;
  cloned.asyncMeta = vnode.asyncMeta;
  cloned.isCloned = true;
  return cloned
}
424992
function clone(obj) {
  var key;
  var copy = {};
  for (key in obj) {
    /* istanbul ignore else */
    if (hop.call(obj, key)) {
      copy[key] = obj[key];
    }
  }
  return copy;
}
892371
function(fieldName, value) {
                var queryStringValue;
                if (!this.hasRegisteredFilterField(fieldName)) {
                    this.registerFilterableField(fieldName, '');
                }
                this.filterableFields[fieldName].value = value;
                if (_.isArray(value)) {
                    queryStringValue = value.join(',');
                } else {
                    queryStringValue = value;
                }
                this.queryParams[fieldName] = function() {
                    return queryStringValue || null;
                };
                this.isStale = true;
            }
1095262
function()
    {
        var q = new Queryable(this._T, this.dataService);

        var _this = this;

        for (var key in this) {
            if (_(this[key]).isArray())
                q[key] = _(this[key]).clone();
            else
                q[key] = this[key];
        }

        return q;
    }
558856
function clone(target) {
  if (target == null || typeof target !== "object") return target;
  var cloned = target.constructor ? target.constructor() : Object.create(null);
  for (var attr in target) {
    if (target.hasOwnProperty(attr)) {
      cloned[attr] = target[attr];
    }
  }
  return cloned;
}
393118
function _clone(o) {
        if (o===null || /undefined|string|number|function/.test(typeof o)) return o;
        var returnObj, v, key;
        returnObj = Array.isArray(o) ? [] : {};
        for (var key in o) {
          v = o[key];
          returnObj[key] = (typeof v === "object") ? _clone(v) : v;
        }
        return returnObj;
      }
1029872
function clone(val){
        switch (kindOf(val)) {
            case 'Object':
                return cloneObject(val);
            case 'Array':
                return cloneArray(val);
            case 'RegExp':
                return cloneRegExp(val);
            case 'Date':
                return cloneDate(val);
            default:
                return val;
        }
    }
885172
function clone(source, deep) {
    if (deep) {
        return lodash.cloneDeep(source);
    } else {
        return lodash.clone(source);
    }
}