Closed
Description
When I first started using the library, I was a little surprised to see it didn't implement a canonical helper for determining if a metric passed the Core Web Vitals thresholds.
While our documentation on web.dev captures what the thresholds are, I can imagine there is value to a developer not needing to hardcode threshold values themselves (e.g imagine if they got this subtly wrong).
I currently implement custom scoring logic in the WIP web vitals extension, but thought I'd throw this idea over the fence to see what you thought.
I'll defer on the API shape if you think this would be helpful, but you could loosely imagine...
getCLS((result) => logCurrentValue('cls', result.value, result.passesThreshold, result.isFinal));