Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

default-browser

sindresorhus19.9mMIT5.2.1TypeScript support: included

Get the default browser

macos, linux, browser, default, plist, web, bundle, bundleid, id, identifier, uti, cfbundlename, applescript

readme

default-browser

Get the default browser

Works on macOS, Linux, and Windows.

Install

npm install default-browser

Usage

import defaultBrowser from 'default-browser';

console.log(await defaultBrowser());
//=> {name: 'Safari', id: 'com.apple.Safari'}