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

@jam3/detect

Package Overview
Dependencies
Maintainers
15
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jam3/detect - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

1

dist/index.d.ts

@@ -87,2 +87,3 @@ import bowser from 'bowser';

browser: boolean;
touch: boolean;
constructor();

@@ -89,0 +90,0 @@ get orientation(): string;

15

dist/index.js

@@ -97,4 +97,4 @@ 'use strict';

this.name = detector.ua.includes('edg/')
? 'microsoft edge'
: detector.base.getBrowserName().toLowerCase();
? 'microsoft-edge'
: detector.base.getBrowserName().toLowerCase().replace(' ', '-');
this.vendor = detector.window.navigator.vendor ? detector.window.navigator.vendor.toLowerCase() : '';

@@ -104,4 +104,4 @@ this.chrome = this.name === 'chrome';

this.safari = this.name === 'safari';
this.edge = this.name === 'microsoft edge';
this.ie = this.name === 'internet explorer';
this.edge = this.name === 'microsoft-edge';
this.ie = this.name === 'internet-explorer';
this.opera = this.name === 'opera';

@@ -162,2 +162,3 @@ this.node = this.name === 'node';

this.browser = !this.node;
this.touch = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
}

@@ -206,5 +207,5 @@ Object.defineProperty(Device.prototype, "orientation", {

function Detect() {
this.os = new OS();
this.browser = new Browser();
this.device = new Device();
this.os = os;
this.browser = browser;
this.device = device;
this.detector = detector;

@@ -211,0 +212,0 @@ }

@@ -89,4 +89,4 @@ import bowser from 'bowser';

this.name = detector.ua.includes('edg/')
? 'microsoft edge'
: detector.base.getBrowserName().toLowerCase();
? 'microsoft-edge'
: detector.base.getBrowserName().toLowerCase().replace(' ', '-');
this.vendor = detector.window.navigator.vendor ? detector.window.navigator.vendor.toLowerCase() : '';

@@ -96,4 +96,4 @@ this.chrome = this.name === 'chrome';

this.safari = this.name === 'safari';
this.edge = this.name === 'microsoft edge';
this.ie = this.name === 'internet explorer';
this.edge = this.name === 'microsoft-edge';
this.ie = this.name === 'internet-explorer';
this.opera = this.name === 'opera';

@@ -154,2 +154,3 @@ this.node = this.name === 'node';

this.browser = !this.node;
this.touch = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
}

@@ -198,5 +199,5 @@ Object.defineProperty(Device.prototype, "orientation", {

function Detect() {
this.os = new OS();
this.browser = new Browser();
this.device = new Device();
this.os = os;
this.browser = browser;
this.device = device;
this.detector = detector;

@@ -203,0 +204,0 @@ }

{
"name": "@jam3/detect",
"version": "2.0.2",
"version": "2.0.3",
"description": "User agent feature detection like Device Orientation, in App Browser Detection, etc",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -112,4 +112,4 @@ import bowser from 'bowser';

this.name = detector.ua.includes('edg/') // https://github.com/lancedikson/bowser/issues/416
? 'microsoft edge'
: detector.base.getBrowserName().toLowerCase();
? 'microsoft-edge'
: detector.base.getBrowserName().toLowerCase().replace(' ', '-');
this.vendor = detector.window.navigator.vendor ? detector.window.navigator.vendor.toLowerCase() : '';

@@ -119,4 +119,4 @@ this.chrome = this.name === 'chrome';

this.safari = this.name === 'safari';
this.edge = this.name === 'microsoft edge';
this.ie = this.name === 'internet explorer';
this.edge = this.name === 'microsoft-edge';
this.ie = this.name === 'internet-explorer';
this.opera = this.name === 'opera';

@@ -166,2 +166,3 @@ this.node = this.name === 'node';

browser: boolean;
touch: boolean;

@@ -184,2 +185,3 @@ constructor() {

this.browser = !this.node;
this.touch = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
}

@@ -186,0 +188,0 @@ get orientation() {

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