{"adoption": {"forks": 576, "observed_at": "2026-08-28T04:08:29.910752+00:00", "stars": 3927}, "canonical_url": "https://ross.abutalabs.com/products/current-device", "card": {"archived": false, "artifact_type": "library", "description": "📱 The easiest way to write conditional CSS and/or JavaScript based on device operating system (iOS, Android, Blackberry, Windows, Firefox OS, MeeGo), orientation (Portrait vs. Landscape), and type (Tablet vs. Mobile).", "domain": ["web-development", "frontend", "mobile-development"], "enriched": true, "function": ["ui-components", "developer-tools"], "health_score": 89, "homepage": "https://matthewhudson.github.io/current-device/", "language": "TypeScript", "license": "MIT", "license_family": "permissive", "maturity": "active", "member_repos": ["matthewhudson/current-device"], "name": "matthewhudson/current-device", "platform": ["browser"], "pushed_at": "2026-06-08T23:55:23+00:00", "repo": "matthewhudson/current-device", "stars": 3927, "tags": ["device-detection", "css-classes", "responsive-design", "user-agent", "mobile-web", "typescript", "javascript", "nodejs"], "topics": ["device-detection", "javascript", "mobile"], "urls": [], "use_cases": ["detect if user is on mobile or tablet in javascript", "apply conditional css based on device operating system", "detect portrait vs landscape orientation in browser", "add device-specific css classes to html element", "serve different styles for ios vs android", "run mobile-specific javascript logic", "detect device type in typescript"], "what_it_is": "A lightweight JavaScript/TypeScript library that detects the device's operating system, type (mobile/tablet/desktop), and orientation, exposing a simple JS API and automatically adding conditional CSS classes to the <html> element. It supports iOS, Android, Blackberry, Windows, macOS, Firefox OS, MeeGo, and more.", "when_to_avoid": ["you need server-side or user-agent-string-based detection with detailed device metadata", "you only need responsive layouts, which CSS media queries handle natively", "you require feature detection rather than device detection", "you need detection of specific browsers or browser versions"], "when_to_choose": ["you need simple client-side device detection with zero configuration", "you want both a JavaScript API and automatic CSS classes from one small library", "you need orientation change callbacks for responsive behavior", "you want TypeScript types included out of the box"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/current-device", "repo": "matthewhudson/current-device", "role": "main", "score": 84}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:08:29.910752+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-29T18:24:42.648486+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "4bcb1ae2efeee30024aa50087944118be2dd541e2b2e0eef2d8935620336c679", "fetched_at": "2026-08-28T04:08:29.910752+00:00", "kind": "readme", "missing": false, "url": "https://github.com/matthewhudson/current-device"}, {"content_hash": "b0aadf60acf1b9696ce8afa2dd5a3a85846c8fcd463f9a9bfb18062b8ca60f54", "fetched_at": "2026-08-29T09:18:50.399783+00:00", "kind": "homepage", "missing": false, "url": "https://matthewhudson.github.io/current-device/"}, {"content_hash": "864117ea856701a771452fc17746e2f5d226a3d5d0dfbd7406d4081f9f42eee2", "fetched_at": "2026-08-29T09:18:50.409155+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/current-device"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 86, "longevity": 100, "rhythm": 72}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 5096, "days_push": 86, "days_rel": 189, "gap_med": 0, "n_releases_24m": 2}, "score": 84, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}