Recursively removes extraneous nested arrays from objects
@param  {Object|Array|String|Integer} obj
@return {Object}
168961
function (obj) {
  var ret = {};

  if( Object.prototype.toString.call(obj) === '[object Object]' ) {
    for (var key in obj) {
      ret[key] = arrayClean(obj[key]);
    }
  }
  else if( Object.prototype.toString.call(obj) === '[object Array]' ) {
    if (obj.length === 1) {
      ret = arrayClean(obj[0]);
    }
    else {
      ret = new Array;
      for(var i=0;i<obj.length;i++) {
        ret.push(arrayClean(obj[i]));
      }
    }
  }
  else {
    ret = obj;
  }
  return ret;
}
1243148
function( obj, objType, stack ) {
				stack = stack || [];
				var res, parser, parserType,
					inStack = inArray( obj, stack );

				if ( inStack !== -1 ) {
					return "recursion(" + ( inStack - stack.length ) + ")";
				}

				objType = objType || this.typeOf( obj  );
				parser = this.parsers[ objType ];
				parserType = typeof parser;

				if ( parserType === "function" ) {
					stack.push( obj );
					res = parser.call( this, obj, stack );
					stack.pop();
					return res;
				}
				return ( parserType === "string" ) ? parser : this.parsers.error;
			}
558719
function removeDuplicateObjectsFromArray(originalArray, prop) {
  var newArray = [];
  var lookupObject = {};

  for (var i in originalArray) {
    lookupObject[originalArray[i][prop]] = originalArray[i];
  }

  for (i in lookupObject) {
    newArray.push(lookupObject[i]);
  }
  return newArray;
}
160641
function(obj) {
			var result = {};
			var keys = this.toArray(arguments, 1);
			Object.keys(obj).forEach(function(key) {
				if (~keys.indexOf(key)) {
					result[key] = obj[key];
				}
			});
			return result;
		}
1354396
function objectToArray(obj) {
        if (!validateHelpers.isPlainObject(obj)) {
            throw new Error('\'obj\' must be a plain object');
        }

        return Object.keys(obj).map(function (key) {
            return obj[key];
        });
    }
999854
function object2array(obj, key) {
    if (typeof obj != "object") {
        return false;
    }
    if (key && typeof key != "string") {
        return false;
    }

    var arr = [];
    var index;
    if (key) {
        for (index in obj) {
            if (obj.hasOwnProperty(index)) {
                obj[index][key] = index;
                arr.push(obj[index]);
            }
        }
    } else {
        for (index in obj) {
            if (obj.hasOwnProperty(index)) {
                arr.push(obj[index]);
            }
        }
    }

    return arr;
}
992110
function(obj) {
		var fromObj;
		for (var i = 1; i < arguments.length; i++) {
			fromObj = arguments[i];
			_.forIn(fromObj, function(value, key) {
				if (value === undefined) {
					delete obj[key];
				} else {
					obj[key] = value;
				}
			});
		}

		return obj;
	}
1091979
function(obj, key) {
		var value;
		for (var i = 2; i < arguments.length; i++) {
			value = arguments[i];
			if (value !== undefined) {
				obj[key] = value;
				break;
			}
		}

		if (value === undefined) delete obj[key];

		return obj;
	}
1334610
function ( obj, fn ) {
		if ( typeof fn !== "function" ) {
			throw new Error( label.error.invalidArguments );
		}

		var remove = [];

		array.each( obj, function ( i ) {
			if ( fn( i ) !== false ) {
				remove.push( i );
			}
			else {
				return false;
			}
		});

		array.each( remove, function ( i ) {
			array.remove( obj, array.index( obj, i) );
		});

		return obj;
	}
268599
function flattenHead(obj) {
    var newHead = [];

    _arrayCopy(newHead, obj["head-start"]);
    _arrayCopy(newHead, obj["head"]);
    _arrayCopy(newHead, obj["head-end"]);

    delete obj["head-start"];
    delete obj["head-end"];
    obj.head = newHead;

    return obj;
}
893777
function makeArray(obj) {
        var isArray;
        if ((isArray = Array.isArray)) {
            return isArray(obj) ? obj : [obj];
        }
        return ArrayPrototype.concat(obj);
    }
537081
function(obj) {

        if (Array.isArray(obj)) {

            return {

                at: function(skip, pos) { return obj[pos] },
                rest: function(skip, pos) { return obj.slice(pos) }
            };
        }

        var iter = toObject(obj)[Symbol.iterator]();

        return {

            at: function(skip) {

                var r;

                while (skip--)
                    r = iter.next();

                return r.value;
            },

            rest: function(skip) {

                var a = [], r;

                while (--skip)
                    r = iter.next();

                while (r = iter.next(), !r.done)
                    a.push(r.value);

                return a;
            }
        };
    }
86505
function deepCleaner(obj, target = null) {

  if (utils.isArray(target)) {
    removeKeyLoop(obj, target);
  } else {
    cleanCyclicObject(obj, target);
  }

  return obj;
}
1332715
function cleanObjectStrings (obj) {
  let cleanObj = {};
  for (let field in obj) {
    if (obj.hasOwnProperty(field)) {
      cleanObj[cleanString(field, true)] = ('' + obj[field]).trim();
    }
  }
  return cleanObj;
}
502006
function clone(obj) {
    if (Array.isArray(obj)) {
        return obj.map(clone);
    } else if (typeof obj === 'object') {
        var copy = {};
        Object.keys(obj).forEach(function (key) {
            copy[key] = clone(obj[key]);
        });
        return copy;
    }
    return obj;
}
258012
function omit(obj, remove) {
  var result = {};
  if (typeof remove === 'string') {
    remove = [].slice.call(arguments, 1);
  }
  for (var prop in obj) {
    if (!obj.hasOwnProperty || obj.hasOwnProperty(prop)) {
      if (remove.indexOf(prop) === -1) {
        result[prop] = obj[prop];
      }
    }
  }
  return result;
}
159305
function cleanUndefinedProperties(obj) {
  var newObj;
  var isArray = false;
  if (typeof obj === 'object' && obj !== null) {
    if (Array.isArray(obj)) {
      newObj = [];
      isArray = true;
    } else {
      newObj = {};
    }
  } else {
    return obj;
  }
  var keys = Object.keys(obj);
  keys.forEach(function (key, i) {
    if (isArray || typeof obj[key] !== 'undefined') {
      newObj[key] = cleanUndefinedProperties(obj[key]);
    }
  });
  return newObj;
}