MCPcopy Index your code
hub / github.com/tinyplex/tinybase / getMetricsObject

Function getMetricsObject

test/unit/common/other.ts:25–33  ·  view source on GitHub ↗
(
  metrics: Metrics,
)

Source from the content-addressed store, hash-verified

23export const noop = () => undefined;
24
25export const getMetricsObject = (
26 metrics: Metrics,
27): IdObj<number | undefined> => {
28 const metricsObject: IdObj<number | undefined> = {};
29 metrics.forEachMetric(
30 (metricId) => (metricsObject[metricId] = metrics.getMetric(metricId)),
31 );
32 return metricsObject;
33};
34
35export const getIndexesObject = (indexes: Indexes): IdObj2<Ids> => {
36 const indexesObject: IdObj2<Ids> = {};

Callers 1

metrics.test.tsFile · 0.90

Calls 2

forEachMetricMethod · 0.65
getMetricMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…