Creates a clone of a provided array, with any empty strings removed.

@private
@param   {Array<*>} originalArray
@return  {Array<*>}
420946
function(originalArray) {
            var cleanArray = [],
                i = -1;

            for (i = 0; i < originalArray.length; i++) {
                if (originalArray[i] !== '') {
                    cleanArray.push(originalArray[i]);
                }
            }

            return cleanArray;
        }
379255
function cloneIt2(o) {
	let keys = Object.keys(o);
	let current = o;
	const acc = {};
	let currentAcc = acc;

	let i = 0;
	let iMax = keys.length + 1;
	let previous = [];
	let activeKey = [];

	for (; i < iMax; i++) {
		if (i === iMax - 1) {
			if (!previous.length) {
				break;
			}

			const prev = previous.pop();
			activeKey.pop();

			i = prev.i;
			iMax = prev.iMax;
			keys = prev.keys;

			let j = 0;
			const jMax = activeKey.length;
			currentAcc = acc;
			current = o;

			for (; j < jMax; j++) {
				currentAcc = currentAcc[activeKey[j]];
				current = current[activeKey[j]];
			}
		} else if (typeof current[keys[i]] === 'object') {
			currentAcc[keys[i]] = {};

			previous.push({ i, iMax, keys });
			activeKey.push(keys[i]);
			current = current[keys[i]];
			currentAcc = currentAcc[keys[i]];
			i = -1;
			keys = Object.keys(current);
			iMax = keys.length + 1;
		} else {
			currentAcc[keys[i]] = current[keys[i]];
		}
	}

	return acc;
}
82800
function clone(obj1, obj2, index) {
  index = index || 0;
  for (var i in obj2) {
    if ('object' == typeof i) obj1[i] = recursiveMerge(obj1[i], obj2[i], index++);
    else obj1[i] = obj2[i];
  }
  return obj1;
}
42299
function clone (data) {
  if (Array.isArray(data)) {
    return data.map(clone)
  } else if (data && typeof data === 'object') {
    let obj = Object.assign({}, data)
    for (let key in obj) {
      if (!obj.hasOwnProperty(key)) continue
      if (typeof obj[key] === 'object') {
        obj[key] = clone(obj[key])
      }
    }
    return obj
  } else {
    return data
  }
}
745788
function(target, index, val, clone) {

            if (isNaN(index) && index != "first" && index != "last") {
                error(index + 'is not a valid index.');
                return;
            }

            var type = objType(target),
                length = target.length;

            //to limit index
            var idx = index < 0 || index == "first" ? 0 : index > length || index == "last" ? length : index;


            //if array push
            if (type == 'array') {
                val = clone ? jsonQ.clone(val) : val;
                target.splice(idx, 0, val);
            }

            //if string concatenate , if number add
            else if (type == 'string') {
                target = target.substring(0, idx) + val + target.substring(idx, length);
            }


            return target;

        }
640389
public static double[] copyOf(double[] original, int newSize) {
     double[] a = new double[newSize];
     System.arraycopy(original, 0, a, 0, original.length);
     return a;
  }
1170503
private Object cloneArray(Object array) {
		Class<?> type = array.getClass();

		if (type == byte[].class) {
			byte[] byteArray = (byte[]) array;
			return byteArray.clone();
		}
		if (type == char[].class) {
			char[] charArray = (char[]) array;
			return charArray.clone();
		}
		if (type == double[].class) {
			double[] doubleArray = (double[]) array;
			return doubleArray.clone();
		}
		if (type == float[].class) {
			float[] floatArray = (float[]) array;
			return floatArray.clone();
		}
		if (type == int[].class) {
			int[] intArray = (int[]) array;
			return intArray.clone();
		}
		if (type == long[].class) {
			long[] longArray = (long[]) array;
			return longArray.clone();
		}
		if (type == short[].class) {
			short[] shortArray = (short[]) array;
			return shortArray.clone();
		}
		if (type == boolean[].class) {
			boolean[] booleanArray = (boolean[]) array;
			return booleanArray.clone();
		}

		Object[] objectArray = (Object[]) array;
		return objectArray.clone();
	}
368518
function clone(value, deep) {
    if (Array.isArray(value)) {
      if (deep) {
        return value.map(function(value) {
          return clone(value, deep);
        });
      } else {
        return value.slice();
      }
    } else if (value && typeof value === 'object') {
      if (value.valueOf() !== value) {
        return new value.constructor(value.valueOf());
      } else {
        var copy = {};
        for (var key in value) {
          var objValue = value[key];
          if (deep) {
            objValue = clone(objValue, deep);
          }
          copy[key] = objValue;
        }
        return copy;
      }
    } else {
      return value;
    }
  }
1250382
function clone(obj, json) {
    if (json)
        return JSON.parse(JSON.stringify(obj));
    return _clone(obj);
}
378595
function deepCloneArray(arr) {
  const clone = [];
  forEach(arr, (item, index) => {
    if (typeof item === "object" && item !== null) {
      if (isArray(item)) {
        clone[index] = deepCloneArray(item);
      } else if (isSpecificValue(item)) {
        clone[index] = cloneSpecificValue(item);
      } else {
        clone[index] = deepExtend({}, item);
      }
    } else {
      clone[index] = item;
    }
  });
  return clone;
}
1273774
function() {
			var options, name, src, copy, copyIsArray, clone,
				target = arguments[0] || {},
				i = 1,
				length = arguments.length;


			// Handle case when target is a string or something (possible in deep copy)
			if (typeof target !== 'object' && typeof target !== 'function') {
				target = {};
			}

			for ( ; i < length; i++ ) {
				// Only deal with non-null/undefined values
				if ( (options = arguments[ i ]) !== null ) {
					// Extend the base object
					for ( name in options ) {
						src = target[ name ];
						copy = options[ name ];

						// Prevent never-ending loop
						if ( target === copy ) {
							continue;
						}

						// Recurse if we're merging plain objects or arrays
						if ( copy && ( typeof copy === 'object' || (copyIsArray = Array.isArray(copy)) ) ) {
							if ( copyIsArray ) {
								copyIsArray = false;
								clone = src && Array.isArray(src) ? src : [];

							} else {
								clone = src && typeof src === 'object' ? src : {};
							}

							// Never move original objects, clone them
							target[ name ] = this.deepMerge(clone, copy );

						// Don't bring in undefined values
						} else if ( copy !== undefined ) {
							target[ name ] = copy;
						}
					}
				}
			}

			// Return the modified object
			return target;
		}
1074482
function extend() {
    var src, copy, name, options, clone;
    var target = arguments[0] || {};
    var i = 1;
    var length = arguments.length;

    for ( ; i < length; i++ ) {
      // Only deal with non-null/undefined values
      if ( (options = arguments[ i ]) != null ) {
        // Extend the base object
        for ( name in options ) {
          src = target[ name ];
          copy = options[ name ];

          // Prevent never-ending loop
          if ( target === copy ) {
            continue;
          }

          // Recurse if we're merging plain objects or arrays
          if ( copy && typeof copy === "object" ) {
            clone = src && typeof src === "object" ? src : {};

            // Never move original objects, clone them
            target[ name ] = extend( clone, copy );

          // Don't bring in undefined values
          } else if ( copy !== undefined ) {
            target[ name ] = copy;
          }
        }
      }
    }

    // Return the modified object
    return target;
  }
115084
@SuppressWarnings("unchecked")
    public static <T> T[] cloneArray(T[] original) {
        if (original == null) {
            return null;
        }

        try {
            Class<?> clazz = original.getClass().getComponentType();
            T[] copy = (T[]) Array.newInstance(clazz, original.length);
            if (copy.length != 0) {
                Constructor<T> copyConstructor = (Constructor<T>) clazz.getConstructor(clazz);
                int i = 0;
                for (T t : original) {
                    copy[i++] = copyConstructor.newInstance(t);
                }
            }
            return copy;
        } catch (Exception e) {
            throw new RuntimeException("Cannot copy array. Does its type have a copy-constructor? " + original, e);
        }
    }
337620
function clone(a) {
  var out = new Float32Array(9)
  out[0] = a[0]
  out[1] = a[1]
  out[2] = a[2]
  out[3] = a[3]
  out[4] = a[4]
  out[5] = a[5]
  out[6] = a[6]
  out[7] = a[7]
  out[8] = a[8]
  return out
}
164962
function arrayClone(arr) {
        var clone = new Array(arr.length);

        this._forEach(arr, function (el, i) {
            clone[i] = el;
        });

        return clone;
    }
104642
function(o) {
        var type = _.util.type(o);

        switch (type) {
          case 'Object':
            var clone = {};

            for (var key in o) {
              if (o.hasOwnProperty(key)) {
                clone[key] = _.util.clone(o[key]);
              }
            }

            return clone;

          case 'Array':
            return o.slice();
        }

        return o;
      }
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;
}