mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
_.toArray is just _.values for objects
This commit is contained in:
@@ -226,7 +226,7 @@
|
|||||||
if (iterable.toArray) return iterable.toArray();
|
if (iterable.toArray) return iterable.toArray();
|
||||||
if (_.isArray(iterable)) return iterable;
|
if (_.isArray(iterable)) return iterable;
|
||||||
if (_.isArguments(iterable)) return slice.call(iterable);
|
if (_.isArguments(iterable)) return slice.call(iterable);
|
||||||
return _.map(iterable, function(val){ return val; });
|
return _.values(iterable);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return the number of elements in an object.
|
// Return the number of elements in an object.
|
||||||
|
|||||||
Reference in New Issue
Block a user