Last active
March 11, 2025 17:54
-
-
Save valterbarros/85e68d1a37dedb86cfe7783a4988a1ef to your computer and use it in GitHub Desktop.
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
Chrome >= 60 |
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 { getUserAgentRegex } from 'browserslist-useragent-regexp'; | |
// outputs: /Chrom(ium|e)\/((6\d|7\d|8[01])\.0|(8[3-9]|9\d|1(0\d|1\d|2\d|3[0-2]))\.0)(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))/.test(navigator.userAgent); | |
console.log(getUserAgentRegex()); |
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
{ | |
"scripts": { | |
"generate": "node generate-legacy-browser-check.js" | |
} | |
"devDependencies": { | |
"browserslist-useragent-regexp": "^4.1.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment