countBy()
Creates or augments an object, making new properties that correspond to values in the given array. Each property added will indicate how many items in the array corresponding to those property names.
This function is valid in v2.1.0 to v2.11.0. This function has been downloaded 0 times.arr
and will be passed (1) the item, (2) the index within arr
and (3) arr
. The return value will be used as the property name for which each item in arr
will count.{}
grouper
.opt_initial
with property names that will contain counts of how many items correspond to the values returned by grouper
.This function directly requires the following function which is included automatically:
has()