UNPKG

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

Version:

Detect default web browser of the current user, cross-platform (Win/Lin/Mac)

18 lines (15 loc) 497 B
var detect; var os = require('os'); if (os.platform() == 'win32') { if (os.release().indexOf('10.') == 0) detect = require('./src/detect-windows10'); else detect = require('./src/detect-windows'); } else if (os.platform() == 'darwin') { detect = require('./src/detect-mac'); } else if (os.platform() == 'linux' || os.platform() == 'freebsd') { detect = require('./src/detect-linux'); } else { detect = require('./src/detect-stub'); } module.exports = detect;