core3-utils

@wixc3/common on Github

Home > @wixc3/common > histogram

histogram() function

Calculate a histogram of iterable elements

Signature:

export declare function histogram<T>(iterable: Iterable<T>): Map<T, number>;

Parameters

Parameter Type Description
iterable Iterable<T>

Returns:

Map<T, number>

an histogram map (element=>count)