Gets the size of collection by returning its length for array-like values or the number of own enumerable string keyed properties for objects.
collection
The collection to inspect.
Returns the collection size.
0.1.0
size([1, 2, 3])// => 3size({ 'a': 1, 'b': 2 })// => 2size('pebbles')// => 7 Copy
size([1, 2, 3])// => 3size({ 'a': 1, 'b': 2 })// => 2size('pebbles')// => 7
Gets the size of
collection
by returning its length for array-like values or the number of own enumerable string keyed properties for objects.