Groups the elements of an array based on the given function and returns the count of elements in each group
sortBy(['five', 'three', 'one'], 'length'); // ['one', 'five', 'three']
sortBy(['five', 'three', 'one'], (value) => -value.length); // ['three', 'five', 'one']
Generated using TypeDoc
Groups the elements of an array based on the given function and returns the count of elements in each group
Example
Example