Download Latest Version v2.5.0 source code.zip (170.0 kB) Google Add to Preferred Sources
Home / v2.5.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-09-28 2.1 kB
v2.5.0 source code.tar.gz 2026-09-28 151.8 kB
v2.5.0 source code.zip 2026-09-28 170.0 kB
Totals: 3 Items   323.9 kB 0

Minor Changes

  • #429 ae3eb78 Thanks @matthewhudson! - Detect HarmonyOS NEXT. Huawei's Android-free HarmonyOS (OpenHarmony 5 and later, ArkWeb browser engine) sends (Phone; OpenHarmony 5.0) ... Mobile, (Tablet; OpenHarmony 5.0) or (PC; OpenHarmony 5.0; HarmonyOS 5.0). Phones were mobile with os: 'unknown', and tablets and PCs were desktop with no OS. All three now report os: 'harmonyos' and device.harmonyos() is true; phones are mobile, tablets tablet, PCs desktop, with the harmonyos mobile, harmonyos tablet and new harmonyos desktop classes. device.android() stays false for them; it is true only for the Android-based HarmonyOS 2 to 4.

Patch Changes

  • #426 3fae889 Thanks @matthewhudson! - Minify the <script> build (dist/index.global.js, the file unpkg and jsDelivr serve). It was shipped unminified at 11 KB; it is now 6 KB, about 2 KB gzipped. The CommonJS and ES module builds are unchanged, since bundlers minify those themselves.

  • #428 306c989 Thanks @matthewhudson! - - device.noConflict() returned this, so calling it unbound (const { noConflict } = device; noConflict()) returned undefined although its type says Device. It now always returns the device object.

  • device.macos() matched any user agent containing "mac", which is why the "Mac Audio" and "Atmaca" device makers needed special cases. It now requires "Macintosh" or "Mac OS", which every Mac browser sends; iOS and Windows Phone user agents, which contain "Mac OS X", were already excluded.
Source: README.md, updated 2026-09-28