Ross ROSS = Recommend OSS · open-source software intelligence for agents

hgoebl/mobile-detect.js

Device detection (phone, tablet, desktop, mobile grade, os, versions) observed · 2026-08-28

github.com/hgoebl/mobile-detect.js · homepage · JavaScript · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

32/100

  • Activity 0
  • Release rhythm 35
  • Longevity 100

Flags: no_releases

How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 4739
  • days_rel: n/a
  • days_push: 1999
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

4138 stars · 865 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded

mobile-detect.js is a JavaScript library that detects device type (phone, tablet, desktop), operating system, and versions by matching regular expressions against a User-Agent string. It is a loose port of the PHP Mobile-Detect library and works in both the browser and Node.js.

Use cases

  • detect if a visitor is on a mobile phone or tablet
  • serve different content based on device type
  • detect operating system from user agent string
  • redirect mobile users to a mobile site
  • log device types of website visitors in Express
  • check if a user agent is a desktop browser

When to choose

  • you must use User-Agent sniffing for legacy reasons and need a lightweight, dependency-free library
  • you need device detection in both browser and Node.js with the same API
  • you are maintaining an older codebase that already relies on UA-based detection

When to avoid

  • you can use feature detection (e.g. Modernizr) or CSS media queries instead, which the author recommends
  • you need reliable, up-to-date detection of the newest devices, since the regex rules are outdated
  • you need the mobile grade feature, which the author says is useless nowadays
  • you are starting a new project where responsive design would remove the need for UA sniffing

Facets

library · maturity maintenance

http-server middleware web-development frontend developer-tools browser user-agent-parsing device-detection mobile-detection responsive-design user-agent-sniffing nodejs javascript

2 sources

Member repositories

RepositoryRoleHealth v2
hgoebl/mobile-detect.jsmain32

For agents

markdown · JSON · MCP: product_card(name="hgoebl/mobile-detect.js")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem