Browserslist Useragent Regexp
JSON →browserslist-useragent-regexp is a utility that compiles a `browserslist` query into a JavaScript regular expression, enabling client-side user agent detection. This allows developers to determine if a browser supports a given `browserslist` configuration directly in the browser, without server-side checks. It is currently at version 4.1.4 and receives active maintenance, with frequent bug fixes and minor feature releases. Key differentiators include its direct integration with `browserslist` for consistent browser targeting across toolchains and its ability to generate optimized regex patterns. Since version 4.0.0, it is an ESM-only package and requires Node.js >= 14. This library is particularly useful for conditional loading of polyfills or different JavaScript bundles based on client-side browser capabilities.
Traffic · last 30 days ↑200% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇸🇬 Singapore · 🇫🇷 France