MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / stoplight

Function stoplight

apps/site/scripts/lighthouse/index.mjs:3–3  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1'use strict';
2
3const stoplight = res => (res >= 90 ? '🟢' : res >= 75 ? '🟠' : '🔴');
4const normalizeScore = res => Math.round(res * 100);
5const formatScore = res => {
6 const normalizedScore = normalizeScore(res);

Callers 1

formatScoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected