bestiejs / platform.js

A platform detection library.
https://mths.be/platform
MIT License
3.22k stars 408 forks source link

Platform product #151

Closed rosygupta closed 4 years ago

rosygupta commented 6 years ago

I'm using the library for a web application primarily used on mobile. However, the library isn't able to pickup the device name 90% of the times i.e platform.product. Any reasons behind it?

Chrome Version: Chrome 66.0.3359.139

ntninja commented 6 years ago

Looking at the code it appears that only a few well-known brands are detected. Based on the fact that this library intentionally does not come with a big database of matching patterns for different device it appears that this may not be the library you're looking for. As a matter of fact you'll likely have to build your own database for this or web-service for this.

PS: No, I'm a developer here – just trying to help. 🙂

bnjmnt4n commented 4 years ago

Yep, we try to keep the list of devices small: otherwise we might end up with a huge file of regexes like other more full-featured solutions. If you do require a lot of specificity, you should try an alternative library like uap instead.