cozy / cozy-libs

Libraries used to build Cozy products and tools.
MIT License
7 stars 12 forks source link

[cozy-device-helper] Add informations about browser #901

Open drazik opened 4 years ago

drazik commented 4 years ago

Currently, we can know if the running platform is web or not. But we don't provide a way to get more details about the browser used. In https://github.com/cozy/cozy-passwords/pull/3, we use detect-browser to get these informations.

Should we use this in cozy-device-helper to return the browser details? Should we add an helper or integrate it to an existing one?

Crash-- commented 4 years ago

We have something a checkBrowser method in https://github.com/cozy/cozy-libs/blob/master/packages/cozy-device-helper/src/deeplink.js#L70

We should extract this method to platform getBrowser() and refactor it to fit you need