default-browser

Get the default browser (OS X)

npm install default-browser
4 downloads in the last week
4 downloads in the last month

default-browser Build Status

Get the default browser (OS X)

Install

npm install --save default-browser

Example

var defaultBrowser = require('default-browser');

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

CLI

You can also use it as a CLI app by installing it globally:

npm install --global default-browser

Usage

default-browser

Which will for example output Safari.

License

MIT © Sindre Sorhus

npm loves you