UADetect 5.0.0
About
UADetect is the library that makes interacting with the Navigator
API a breeze, and continuing with that motto, UADetect 5 brings many new features, with complete type definitions (for real this time), and the sunset of some redundant components.
What's New
- "Methods" allow you to re-call the functions that create the components.
- Many new, standalone methods are now available, such as
vibrate
, orregisterServiceWorker
- Many new, standalone methods are now available, such as
- New components, such as
deviceMemory
language
camera
audio
- General improvements to documentation
Complete Type Definitions
We want to start this section by apologizing for the miscommunication regarding type definitions in the past. We believed that publishing the entire types/
directory with npm would allow editors to just pick up the entire definitions, and to our credit, it was working on our systems, but that is also because we wrote the library. Now, npm only publishes the index.d.ts
file, which imports all of the other files, which means
OUR LIBRARY IS NOW FULLY STRONGLY TYPED
Breaking Changes/Depreciations
It's always sad to see some of our beloved components go the way of the dinosaurs, but in keeping the library fresh, and modern, some must be removed in order to make room for other features, while keeping the library as small as possible. Here are the removed components:
version
- Never reliably returned the version of the browser
codeName
- Always returned
mozilla
- Always returned
engine
- Always returned
Gecko
- Always returned
doNotTrackStatus
- Was not an accurate indicator of the user's actual tracking preferences.