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

@aw-web-design/x-default-browser

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aw-web-design/x-default-browser - npm Package Compare versions

Comparing version 1.4.20 to 1.4.21

test/mac.js

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [1.4.21](https://github.com/The-Code-Monkey/TechStack/compare/@aw-web-design/x-default-browser@1.4.20...@aw-web-design/x-default-browser@1.4.21) (2022-05-19)
**Note:** Version bump only for package @aw-web-design/x-default-browser
## 1.4.20 (2022-05-19)

@@ -8,0 +16,0 @@

4

package.json
{
"name": "@aw-web-design/x-default-browser",
"version": "1.4.20",
"version": "1.4.21",
"description": "Detect default web browser of the current user, cross-platform (Win/Lin/Mac)",

@@ -35,3 +35,3 @@ "license": "MIT",

},
"gitHead": "28793a943c709ca945acce1b728917cdc61fea30"
"gitHead": "ecd761a642904a7601bce763244c6263e0371f2f"
}

@@ -1,27 +0,24 @@

var defaultBrowserMac = require('default-browser-id');
const defaultBrowserId = import('default-browser-id');
module.exports = function (callback) {
defaultBrowserMac(function (err, browserId) {
if (err) {
callback('Unable to retrieve default browser: ' + err);
return;
}
module.exports = async function (callback) {
const id = await defaultBrowserId.then(res => res.default());
var value = browserId;
var valueLC = value.toLowerCase();
if (id) {
const idLC = id.toLowerCase();
/*
Safari com.apple.Safari
Google Chrome com.google.chrome
Opera com.operasoftware.Opera
Firefox org.mozilla.firefox
*/
var out = {
Safari com.apple.Safari
Google Chrome com.google.chrome
Opera com.operasoftware.Opera
Firefox org.mozilla.firefox
*/
const out = {
isIE: false,
isSafari: valueLC.indexOf('safari') > -1,
isFirefox: valueLC.indexOf('firefox') > -1,
isChrome: valueLC.indexOf('google') > -1,
isChromium: valueLC.indexOf('chromium') > -1, // untested
isOpera: valueLC.indexOf('opera') > -1,
identity: value,
isSafari: idLC.indexOf('safari') > -1,
isFirefox: idLC.indexOf('firefox') > -1,
isChrome: idLC.indexOf('google') > -1,
isChromium: idLC.indexOf('chromium') > -1, // untested
isOpera: idLC.indexOf('opera') > -1,
identity: id,
};

@@ -33,3 +30,5 @@ out.isBlink = out.isChrome || out.isChromium || out.isOpera;

callback(null, out);
});
} else {
callback('Unable to retrieve default browser');
}
};
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