Class: Aggregator

Aggregator

Instantiate a Aggregator object.

Methods

Given an array of buckets, will execute the provided aggregation specification against all relevant entries.
Name Type Description
buckets Array The array of buckets.
Returns:
aggregated buckets.
Executes a function for each bucket, passing the bucket and offset reduced index arguments.
Name Type Description
buckets Array The array of buckets.
func function The function to execute.

getBucketRange(buckets){Object}

Returns the start and end indices for the set of buckets.
Name Type Description
buckets Array The array of buckets.
Returns:
range object.

translateTopic(topic){String}

Checks the layer metadata for a translation map. If it exists, returns the translated entry for the provided topic.
Name Type Description
topic String The topic to translate.
Returns:
translated topic.