Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/browser

Package Overview
Dependencies
Maintainers
24
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/browser - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

27

build/cjs/browser.js

@@ -12,7 +12,5 @@ 'use strict';

}
get version() {
return this.ua.getBrowser().version || '';
}
get majorVersion() {

@@ -22,55 +20,41 @@ const {

} = this;
if (version === '') {
return undefined;
}
const majorVersion = parseInt(version.split('.')[0], 10);
return Number.isNaN(majorVersion) ? undefined : majorVersion;
}
get unknown() {
return this.name === '';
}
get isMobile() {
return MOBILE_DEVICE_TYPES.includes(this.ua.getDevice().type) || this.isPOSFirstPartyDevice();
}
get isDesktop() {
return !this.isMobile;
}
get isNativeApp() {
return this.ua.getUA().includes('Shopify Mobile/', 0);
}
get isShopifyPOSApp() {
return this.ua.getUA().includes('Shopify POS/', 0);
}
get os() {
return this.ua.getOS().name || '';
}
get isWindows() {
return this.os.includes('Windows');
}
get isMac() {
return this.os.includes('Mac OS');
}
get isSafari() {
return this.name.includes('Safari');
}
get isChrome() {
return this.name.includes('Chrome');
}
get isAndroidChrome() {
return this.ua.getUA().includes('Android') && this.name.includes('Chrome');
}
get isAndroid() {

@@ -80,15 +64,11 @@ const os = this.ua.getOS();

}
get isFirefox() {
return this.name === 'Firefox';
}
get isIE() {
return this.name.includes('IE');
}
get isEdge() {
return this.name === 'Edge';
}
get isIOS() {

@@ -100,3 +80,2 @@ const os = this.ua.getOS();

}
constructor({

@@ -109,9 +88,8 @@ userAgent,

this.ua = new uaParserJs.UAParser(userAgent);
} // POS Go is a first party device that is not detected as a mobile device
}
// POS Go is a first party device that is not detected as a mobile device
isPOSFirstPartyDevice() {
return this.ua.getUA().includes('WSC6X') || this.ua.getUA().includes('WTH11');
}
}

@@ -122,3 +100,2 @@ function asPlainObject(browser) {

}
return {

@@ -125,0 +102,0 @@ name: browser.name,

2

package.json
{
"name": "@shopify/browser",
"version": "3.2.1",
"version": "3.2.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Utilities for extracting browser information from user-agents",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc