Created
October 18, 2025 12:16
-
-
Save sakupi01/a3fa9b025213e1e56444299d29bf7aaf to your computer and use it in GitHub Desktop.
Baseline Browser Compatible Version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { getCompatibleVersions } from 'baseline-browser-mapping'; | |
| // Automatically fetch the latest Baseline Widely Available browser versions | |
| const compatibleVersions = await getCompatibleVersions(); | |
| // Check if the current browser meets Baseline criteria | |
| function shouldShowWarning(userAgent) { | |
| const browserInfo = parseUserAgent(userAgent); | |
| return browserInfo.version < compatibleVersions[browserInfo.name]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment