diff --git a/lodash.src.js b/lodash.src.js index 342a9f48c..8faa5ab3e 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -6606,6 +6606,21 @@ : arrayCopy(collection); } + /** + * Converts `value` to a plain object. + * + * @static + * @memberOf _ + * @category Collection + * @param {*} value The value to convert. + * @returns {Object} Returns the converted object. + */ + function toPlainObject(value) { + return (isArray(value) || isArguments(value) || isTypedArray(value)) + ? arrayToObject(value) + : baseCopy(value, keysIn(value)); + } + /** * Performs a deep comparison between each element in `collection` and the * source object, returning an array of all elements that have equivalent @@ -10624,6 +10639,7 @@ lodash.thru = thru; lodash.times = times; lodash.toArray = toArray; + lodash.toPlainObject = toPlainObject; lodash.transform = transform; lodash.union = union; lodash.uniq = uniq;