MCPcopy
hub / github.com/prometheus/client_js / getValuesByLabel

Function getValuesByLabel

test/exemplarsTest.js:251–258  ·  view source on GitHub ↗
(label, values, key)

Source from the content-addressed store, hash-verified

249 }, {});
250 }
251 function getValuesByLabel(label, values, key) {
252 return values.reduce((acc, val) => {
253 if (val.labels && val.labels[key || 'le'] === label) {
254 acc.push(val);
255 }
256 return acc;
257 }, []);
258 }
259 },
260 );
261});

Callers 1

exemplarsTest.jsFile · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected