express-useragent
express-useragent copied to clipboard
Inconsistent results for `isDesktop` with jsdom
When using jsdom, the host's architecture is reported. On the mac:
Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0
On Linux (CI):
Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0
isMac
does not comprehend darwin
as being a Mac and, therefore, does not report it as isDesktop
. When running on CircleCI with Linux, this will report isLinux: true
, triggering isDesktop: true
.
I propose that isMac
also check for darwin
. If you're ok with this, I'll happily open a PR :)