Simplify arrayToObject.

This commit is contained in:
John-David Dalton
2015-01-15 02:14:46 -08:00
committed by jdalton
parent f06c9d5b9b
commit 31b4a9197f

View File

@@ -4025,15 +4025,15 @@
}
/**
* Converts `collection` to an array-like object.
* Converts `array` to a plain array-like object.
*
* @private
* @param {Array|Object|string} collection The collection to convert.
* @returns {Object} Returns the converted array-like object.
* @param {Array} array The array to convert.
* @returns {Object} Returns the converted object.
*/
function arrayToObject(collection) {
function arrayToObject(array) {
var result = { 'length': 0 };
push.apply(result, toObject(collection));
push.apply(result, array);
return result;
}