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.12.0 to v2.14.3.
This function has been downloaded 3 times.
Array or array-like object containing items to group together and count.
If a function, it will be passed a value which will be used to group the items in
arr. If an array or a string it will be seen as the path within each item in
arr to the property by which to group each item.
Object to augment with property names that will contain counts of how many items correspond to the values returned by
opt_initial with property names that will contain counts of how many items correspond to the values returned by
This function requires the following functions which are included automatically:
Every object descended from Object inherits the hasOwnProperty method. This method can be used to determine whether an object has the specified property as a direct property of that object; unlike the in operator, this method does not check down the object's prototype chain.
Gets the value under the given
root object and
Either gets the type of a value or adds a constructor registering its custom type name.
Takes an array and groups the items together based on a given hasher function.
Traverses an array and returns an object with the values from the array placed in the specified indices.