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

@probe.gl/env

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@probe.gl/env - npm Package Compare versions

Comparing version 3.5.0-alpha.4 to 3.5.0-alpha.5

12

dist/es5/lib/get-browser.js

@@ -11,4 +11,2 @@ "use strict";

var _globals = require("./globals");
var _isBrowser = _interopRequireDefault(require("./is-browser"));

@@ -18,4 +16,6 @@

const window = globalThis;
function isMobile() {
return typeof _globals.window.orientation !== 'undefined';
return typeof window.orientation !== 'undefined';
}

@@ -46,11 +46,11 @@

if (_globals.window.chrome) {
if (window.chrome) {
return 'Chrome';
}
if (_globals.window.safari) {
if (window.safari) {
return 'Safari';
}
if (_globals.window.mozInnerScreenX) {
if (window.mozInnerScreenX) {
return 'Firefox';

@@ -57,0 +57,0 @@ }

@@ -1,4 +0,4 @@

import { window } from './globals';
import isBrowser from './is-browser';
import isElectron from './is-electron';
const window = globalThis;
export function isMobile() {

@@ -5,0 +5,0 @@ return typeof window.orientation !== 'undefined';

export declare function isMobile(): boolean;
export default function getBrowser(mockUserAgent?: string): string;
export default function getBrowser(mockUserAgent?: string): 'Node' | 'Electron' | 'Chrome' | 'Firefox' | 'Safari' | 'Edge' | 'IE' | 'Unknown';
//# sourceMappingURL=get-browser.d.ts.map

@@ -22,5 +22,5 @@ // Copyright (c) 2017 Uber Technologies, Inc.

// make sure it can be imported in isolation
import { window } from './globals';
import isBrowser from './is-browser';
import isElectron from './is-electron';
const window = globalThis;
export function isMobile() {

@@ -27,0 +27,0 @@ return typeof window.orientation !== 'undefined';

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "3.5.0-alpha.4",
"version": "3.5.0-alpha.5",
"keywords": [

@@ -31,3 +31,3 @@ "javascript",

},
"gitHead": "5f0c4ef4db3b53b0be8ebabcf42e2bc276c7bf44"
"gitHead": "8717b64234cc62be48396c4ffbd614e7d7a42cfe"
}

@@ -24,6 +24,7 @@ // Copyright (c) 2017 Uber Technologies, Inc.

import {window} from './globals';
import isBrowser from './is-browser';
import isElectron from './is-electron';
const window = globalThis;
export function isMobile(): boolean {

@@ -36,3 +37,5 @@ return typeof window.orientation !== 'undefined';

/* eslint-disable complexity */
export default function getBrowser(mockUserAgent?: string): string {
export default function getBrowser(
mockUserAgent?: string
): 'Node' | 'Electron' | 'Chrome' | 'Firefox' | 'Safari' | 'Edge' | 'IE' | 'Unknown' {
if (!mockUserAgent && !isBrowser()) {

@@ -39,0 +42,0 @@ return 'Node';

Sorry, the diff of this file is not supported yet

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