MCPcopy
hub / github.com/Zizzamia/perfume.js / getVitalsScore

Function getVitalsScore

src/vitalsScore.ts:46–57  ·  view source on GitHub ↗
(
  measureName: string,
  value: number,
)

Source from the content-addressed store, hash-verified

44};
45
46export const getVitalsScore = (
47 measureName: string,
48 value: number,
49): IVitalsScore => {
50 if (!webVitalsScore[measureName]) {
51 return null;
52 }
53 if (value <= webVitalsScore[measureName][0]) {
54 return 'good';
55 }
56 return value <= webVitalsScore[measureName][1] ? 'needsImprovement' : 'poor';
57};

Callers 4

markNTBTFunction · 0.90
logMetricFunction · 0.90
initPerfumeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected