When running a PWA there are times when you need to know which browser and device you are working on. This utility is a great tool for retrieving that information, but there are two additional pieces of information that would be helpful.
One is if the app is running in the browser in a standalone mode. Knowing this is useful for:
Whether to present an installation prompt, especially on iOS
Screen layout
Opening links
Having a single property to check across browsers instead of needing to check navigator and media, would be preferred.
Knowing when the app is online or offline is helpful in how to manage a number of functionalities in a PWA. Again, having one property to check would be the simplest.
When running a PWA there are times when you need to know which browser and device you are working on. This utility is a great tool for retrieving that information, but there are two additional pieces of information that would be helpful.
One is if the app is running in the browser in a standalone mode. Knowing this is useful for:
Having a single property to check across browsers instead of needing to check navigator and media, would be preferred.
Knowing when the app is online or offline is helpful in how to manage a number of functionalities in a PWA. Again, having one property to check would be the simplest.