getMetricIds
The getMetricIds
method returns an array of the Metric
Ids
registered with this Metrics
object.
getMetricIds(): Ids
Example
This example creates a Metrics
object with two definitions, and then gets the Ids
of the definitions.
import {createMetrics, createStore} from 'tinybase';
const metrics = createMetrics(createStore())
.setMetricDefinition('speciesCount', 'species')
.setMetricDefinition('petsCount', 'pets');
console.log(metrics.getMetricIds());
// -> ['speciesCount', 'petsCount']
Since
v1.0.0