levithomason / canibrowse

Browser detection and check API
2 stars 0 forks source link

Support to query browser versions #10

Closed toomuchdesign closed 6 years ago

toomuchdesign commented 7 years ago

Hi @levithomason, I was thinking about how to feed this library with a browserlist query string or directly with browserlistoutput.

The main problem to me seems that 'browserlist' considers a smaller set of browsers than 'bowser', leaving a grey area between the 2 libraries.

What do you think about it? Greetings! 😃

levithomason commented 7 years ago

I'm definitely in favor. Per the readme:

image

😄

That said, I've commented on an open issue over at bowser to support browserlist names. In the meantime, we can just make a map that normalizes the two sets of names. A PR would be awesome.

toomuchdesign commented 7 years ago

I'd like to understand how we might deal with the fact that caniuse-lite (used by browserlist) seems to considers only a limited set of browsers.

Let's say we supply last 2 versions querystring: we would be able make a version check only for those browser supported bycaniuse-lite.

Any other minor browser (eg. Vivaldi), would not be part of the browserlistlist and therefore we would be forced to process it as an unknown/unrecognized browser.

levithomason commented 7 years ago

If I understand the issue correctly, I think we'd just note in the docs that using browser queries may limit the number of recognized browsers.

Users can opt to just get detection info and do edge case checks themselves.

levithomason commented 6 years ago

@toomuchdesign closing for housekeeping, happy to reopen if we find a path forward and time to execute it.