You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 504f77a
Browse filesBrowse the repository at this point in the historyBrowse files
docs: correct bundle-size figures and add security policy
- Update the bundle-size claim from "~1.5 kB" to the accurate "~1 kB"
min+gzip across the README, hero artwork, and Docusaurus docs.
size-limit reports 827 B (ESM, brotli); the minified UMD gzips to
1120 B, so ~1 kB is the honest figure.
- Fix the README API section: it lists twelve exports, not eleven.
- Add SECURITY.md — the README already linked to it, but the file was
missing. Documents supported versions, private reporting, and scope.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pick `ua-parser-js` if you need version numbers or device info. Pick `get-browser` if you just need the single, lowercase, typed answer to *which browser is this?* — see [the full comparison](https://yankouskia.github.io/get-browser/docs/comparison).
Copy file name to clipboardExpand all lines: website/docs/faq.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ No. If `navigator` isn't available (Node, Workers, Deno), every detector cleanly
46
46
47
47
## Why not just regex the UA myself?
48
48
49
-
You can! The library is ~1.5 kB because the regexes aren't trivial — Chrome-on-Edge, Firefox-on-iOS, Safari-vs-CriOS, Opera Mini, and the long tail of mobile detection have edge cases that aren't obvious. We've debugged them so you don't have to.
49
+
You can! The library is ~1 kB because the regexes aren't trivial — Chrome-on-Edge, Firefox-on-iOS, Safari-vs-CriOS, Opera Mini, and the long tail of mobile detection have edge cases that aren't obvious. We've debugged them so you don't have to.
detect() ===browsers.SAFARI; // → true on Safari (with the constant type-checked)
18
18
```
19
19
20
-
That's the whole pitch. **~1.5 kB** min+gzip, zero dependencies, dual ESM + CJS, strict TypeScript types, and an SSR-safe API. It pairs `detect()` with a handful of single-purpose predicates (`isChrome`, `isMobile`, …) when all you want is a boolean.
20
+
That's the whole pitch. **~1 kB** min+gzip, zero dependencies, dual ESM + CJS, strict TypeScript types, and an SSR-safe API. It pairs `detect()` with a handful of single-purpose predicates (`isChrome`, `isMobile`, …) when all you want is a boolean.
21
21
22
22
## Should I use this?
23
23
@@ -39,7 +39,7 @@ See [feature detection vs UA sniffing](/docs/guides/feature-vs-ua) for the longe
39
39
40
40
## What you get
41
41
42
-
-**🪶 Tiny** — ~1.5 kB min+gzip, zero dependencies, fully tree-shakeable (single predicates ship at ~400 bytes).
42
+
-**🪶 Tiny** — ~1 kB min+gzip, zero dependencies, fully tree-shakeable (single predicates ship at ~400 bytes).
43
43
-**🧠 Typed** — `detect()` returns the `Browser` union, never plain `string`. Exhaustive `switch` statements compile.
44
44
-**🏗️ SSR-safe** — every detector takes `{ userAgent, vendor }`. No `window` at import time. Works in Node, Next.js, Remix, Astro, Workers, Deno.
45
45
-**📦 Dual ESM + CJS** — `import` and `require` both work, types ship for both. UMD bundle for `<script>` tags.
description="A ~1.5 kB TypeScript utility that returns a strict union for the current user-agent. Works in Node, Next.js, Remix, Workers, Deno, and the browser. Zero runtime dependencies."
15
+
description="A ~1 kB TypeScript utility that returns a strict union for the current user-agent. Works in Node, Next.js, Remix, Workers, Deno, and the browser. Zero runtime dependencies."
0 commit comments