{"_id":"x-default-browser","_rev":"3504759","name":"x-default-browser","description":"Detect default web browser of the current user, cross-platform (Win/Lin/Mac)","dist-tags":{"latest":"0.5.2"},"maintainers":[{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"}],"time":{"modified":"2024-08-27T20:13:48.000Z","created":"2014-12-09T13:07:35.787Z","0.5.2":"2022-11-13T20:57:22.389Z","0.5.1":"2022-11-13T20:09:59.000Z","0.5.0":"2022-11-13T19:24:40.972Z","0.4.0":"2017-04-24T21:45:08.631Z","0.3.1":"2015-11-19T12:11:28.071Z","0.3.0":"2015-01-16T16:23:06.700Z","0.2.0":"2014-12-09T13:07:35.787Z"},"users":{"f124275809":true,"kontrax":true},"author":{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/jakub-g/x-default-browser.git"},"versions":{"0.5.2":{"name":"x-default-browser","version":"0.5.2","description":"Detect default web browser of the current user, cross-platform (Win/Lin/Mac)","author":{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"},"license":"MIT","homepage":"https://github.com/jakub-g/x-default-browser","repository":{"type":"git","url":"git+https://github.com/jakub-g/x-default-browser.git"},"bugs":{"url":"https://github.com/jakub-g/x-default-browser/issues"},"bin":{"x-default-browser":"bin/x-default-browser.js"},"main":"index.js","scripts":{"lint":"jshint index.js lib bin","mocha":"mocha","test":"npm run lint && npm run mocha"},"keywords":["windows","ubuntu","linux","default","browser"],"optionalDependencies":{"default-browser-id":"^2.0.0"},"devDependencies":{"jshint":"^2.13.5","mocha":"^10.0.0","rewire":"^6.0.0"},"gitHead":"878a2c7ce8ced6e20b9bfcc9fcbd8500627b4ffb","dependencies":{"default-browser-id":"^2.0.0"},"_id":"x-default-browser@0.5.2","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"shasum":"de392c739b5e946fb54310e6b897db0cb7944f67","size":6500,"noattachment":false,"key":"/x-default-browser/-/x-default-browser-0.5.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/x-default-browser/download/x-default-browser-0.5.2.tgz"},"_npmUser":{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"},"directories":{},"maintainers":[{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-default-browser_0.5.2_1668373042247_0.03257603091803163"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-13T20:57:25.478Z","publish_time":1668373042389,"_cnpm_publish_time":1668373042389},"0.5.1":{"name":"x-default-browser","version":"0.5.1","description":"Detect default web browser of the current user, cross-platform (Win/Lin/Mac)","author":{"name":"Jakub Gieryluk","email":"jakub.g.opensource@gmail.com"},"license":"MIT","homepage":"https://github.com/jakub-g/x-default-browser","repository":{"type":"git","url":"git+https://github.com/jakub-g/x-default-browser.git"},"bugs":{"url":"https://github.com/jakub-g/x-default-browser/issues"},"bin":{"x-default-browser":"bin/x-default-browser.js"},"main":"index.js","scripts":{"lint":"jshint index.js lib bin","mocha":"mocha","test":"npm run lint && npm run mocha"},"keywords":["windows","ubuntu","linux","default","browser"],"optionalDependencies":{"default-browser-id":"^2.0.0"},"devDependencies":{"jshint":"^2.13.5","mocha":"^10.0.0","rewire":"^6.0.0"},"gitHead":"bdda876656004b200b9a84d08ea2c0b074b704ee","dependencies":{"default-browser-id":"^2.0.0"},"_id":"x-default-browser@0.5.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"shasum":"2b841a3f967b64bccdf5a5996ff1d47d6a58642c","size":6426,"noattachment":false,"key":"/x-default-browser/-/x-default-browser-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/x-default-browser/download/x-default-browser-0.5.1.tgz"},"_npmUser":{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"},"directories":{},"maintainers":[{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-default-browser_0.5.1_1668370198850_0.610963893417233"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-13T20:10:11.573Z","publish_time":1668370199000,"_cnpm_publish_time":1668370199000},"0.5.0":{"name":"x-default-browser","version":"0.5.0","description":"Detect default web browser of the current user, cross-platform (Win/Lin/Mac)","author":{"name":"Jakub Gieryluk","email":"jakub.g.opensource@gmail.com"},"license":"MIT","homepage":"https://github.com/jakub-g/x-default-browser","repository":{"type":"git","url":"git+https://github.com/jakub-g/x-default-browser.git"},"bugs":{"url":"https://github.com/jakub-g/x-default-browser/issues"},"bin":{"x-default-browser":"bin/x-default-browser.js"},"main":"index.js","scripts":{"lint":"jshint index.js lib bin","mocha":"mocha","test":"npm run lint && npm run mocha"},"keywords":["windows","ubuntu","linux","default","browser"],"optionalDependencies":{"default-browser-id":"^2.0.0"},"devDependencies":{"jshint":"^2.13.5","mocha":"^10.0.0","rewire":"^6.0.0"},"gitHead":"ac7ec5dbec59a44f4de00318780f4d5e515833cd","dependencies":{"default-browser-id":"^2.0.0"},"_id":"x-default-browser@0.5.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"shasum":"44415336d08538da94c1dbc3596f86fe33d673bd","size":5983,"noattachment":false,"key":"/x-default-browser/-/x-default-browser-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/x-default-browser/download/x-default-browser-0.5.0.tgz"},"_npmUser":{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"},"directories":{},"maintainers":[{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-default-browser_0.5.0_1668367480778_0.6263826736912816"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-13T19:24:57.896Z","publish_time":1668367480972,"_cnpm_publish_time":1668367480972},"0.4.0":{"name":"x-default-browser","version":"0.4.0","description":"Detect default web browser of the current user, cross-platform (Win/Lin/Mac)","author":{"name":"Jakub Gieryluk","email":"jakub.g.opensource@gmail.com"},"license":"MIT","homepage":"https://github.com/jakub-g/x-default-browser","repository":{"type":"git","url":"git+https://github.com/jakub-g/x-default-browser.git"},"bugs":{"url":"https://github.com/jakub-g/x-default-browser/issues"},"bin":{"x-default-browser":"bin/x-default-browser.js"},"main":"index.js","scripts":{"lint":"jshint index.js lib bin","mocha":"mocha","test":"npm run lint && npm run mocha"},"keywords":["windows","ubuntu","linux","default","browser"],"optionalDependencies":{"default-browser-id":"^1.0.4"},"devDependencies":{"jshint":"^2.5.10","mocha":"^2.0.1","rewire":"^2.1.3"},"gitHead":"e3447e61d8682b8bcb6ae04a8adcf04336220b1a","dependencies":{"default-browser-id":"^1.0.4"},"_id":"x-default-browser@0.4.0","_shasum":"70cf0da85da7c0ab5cb0f15a897f2322a6bdd481","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.8.0","_npmUser":{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"},"dist":{"shasum":"70cf0da85da7c0ab5cb0f15a897f2322a6bdd481","size":5840,"noattachment":false,"key":"/x-default-browser/-/x-default-browser-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/x-default-browser/download/x-default-browser-0.4.0.tgz"},"maintainers":[{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/x-default-browser-0.4.0.tgz_1493070306676_0.16222728160209954"},"directories":{},"publish_time":1493070308631,"_hasShrinkwrap":false,"_cnpm_publish_time":1493070308631},"0.3.1":{"name":"x-default-browser","version":"0.3.1","description":"Detect default web browser of the current user, cross-platform (Win/Lin/Mac)","author":{"name":"Jakub Gieryluk","email":"jakub.g.opensource@gmail.com"},"license":"MIT","homepage":"https://github.com/jakub-g/x-default-browser","repository":{"type":"git","url":"git+https://github.com/jakub-g/x-default-browser.git"},"bugs":{"url":"https://github.com/jakub-g/x-default-browser/issues"},"bin":{"x-default-browser":"bin/x-default-browser.js"},"main":"index.js","scripts":{"lint":"jshint index.js lib bin","mocha":"mocha","test":"npm run lint && npm run mocha"},"keywords":["windows","ubuntu","linux","default","browser"],"optionalDependencies":{"default-browser-id":"^1.0.4"},"devDependencies":{"jshint":"^2.5.10","mocha":"^2.0.1","rewire":"^2.1.3"},"gitHead":"2b3aba1f3725ddffe7e11dacdcf22cfaa5b14bbc","dependencies":{"default-browser-id":"^1.0.4"},"_id":"x-default-browser@0.3.1","_shasum":"7f6194154fd1786cf261e68b5488c47127a04977","_from":".","_npmVersion":"2.14.8","_nodeVersion":"0.12.7","_npmUser":{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"},"dist":{"shasum":"7f6194154fd1786cf261e68b5488c47127a04977","size":5344,"noattachment":false,"key":"/x-default-browser/-/x-default-browser-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/x-default-browser/download/x-default-browser-0.3.1.tgz"},"maintainers":[{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"}],"directories":{},"publish_time":1447935088071,"_cnpm_publish_time":1447935088071,"_hasShrinkwrap":false},"0.3.0":{"name":"x-default-browser","version":"0.3.0","description":"Detect default web browser of the current user, cross-platform (Win/Lin/Mac)","author":{"name":"Jakub Gieryluk","email":"jakub.g.opensource@gmail.com"},"license":"MIT","homepage":"https://github.com/jakub-g/x-default-browser","repository":{"type":"git","url":"https://github.com/jakub-g/x-default-browser.git"},"bugs":{"url":"https://github.com/jakub-g/x-default-browser/issues"},"bin":{"x-default-browser":"bin/x-default-browser.js"},"main":"index.js","scripts":{"lint":"jshint index.js lib bin","mocha":"mocha","test":"npm run lint && npm run mocha"},"keywords":["windows","ubuntu","linux","default","browser"],"optionalDependencies":{"default-browser-id":"1.0.2"},"devDependencies":{"jshint":"2.5.10","mocha":"2.0.1","rewire":"2.1.3"},"dependencies":{"default-browser-id":"1.0.2"},"_id":"x-default-browser@0.3.0","dist":{"shasum":"850d5137bc97b78176e69ae916417fe3d4e97d5d","size":5306,"noattachment":false,"key":"/x-default-browser/-/x-default-browser-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/x-default-browser/download/x-default-browser-0.3.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"},"maintainers":[{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"}],"directories":{},"publish_time":1421425386700,"_cnpm_publish_time":1421425386700,"_hasShrinkwrap":false},"0.2.0":{"name":"x-default-browser","version":"0.2.0","description":"Detect default web browser of the current user, cross-platiform (Win/Lin/Mac)","author":{"name":"Jakub Gieryluk","email":"jakub.g.opensource@gmail.com"},"license":"MIT","homepage":"https://github.com/jakub-g/x-default-browser","repository":{"type":"git","url":"https://github.com/jakub-g/x-default-browser.git"},"bugs":{"url":"https://github.com/jakub-g/x-default-browser/issues"},"bin":{"x-default-browser":"bin/x-default-browser.js"},"main":"index.js","scripts":{"lint":"jshint index.js lib bin","mocha":"mocha","test":"npm run lint && npm run mocha"},"keywords":["windows","ubuntu","linux","default","browser"],"optionalDependencies":{"default-browser":"1.0.0"},"devDependencies":{"jshint":"2.5.10","mocha":"2.0.1","rewire":"2.1.3"},"dependencies":{"default-browser":"1.0.0"},"_id":"x-default-browser@0.2.0","dist":{"shasum":"25bb6e0ec3fc0b3f0f9b55629703f911f3fda1ef","size":5293,"noattachment":false,"key":"/x-default-browser/-/x-default-browser-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/x-default-browser/download/x-default-browser-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"ariatemplates","email":"admin@ariatemplates.com"},"maintainers":[{"name":"jakub-g","email":"jakub.g.opensource@gmail.com"}],"directories":{},"publish_time":1418130455787,"_cnpm_publish_time":1418130455787,"_hasShrinkwrap":false}},"readme":"# x-default-browser\n\n[![Build Status](https://secure.travis-ci.org/jakub-g/x-default-browser.png)](http://travis-ci.org/jakub-g/x-default-browser)\n\n[![Get it on npm](https://nodei.co/npm/x-default-browser.png?compact=true)](https://www.npmjs.org/package/x-default-browser)\n\nThis _cross-platform_ module finds out the default browser for the current user.\n\nRecent versions (~0.5.x) were tested locally on Windows 10 64-bit, Mac OS 12.6.\n\nOlder versions (~0.4.x) were tested locally on Windows 10 64-bit, Mac OS 10, Windows 7 64-bit, Windows XP 32-bit, Ubuntu 14.04 64-bit (en-US locale),\n\nIt requires nodejs and npm. If you don't have node, grab it at [nodejs.org](https://nodejs.org).\nNode installer bundles npm (node package manager)\n\n## How it works\n\n- Windows:\n  - checks registry value `HKCU\\Software\\Clients\\StartMenuInternet`\n- Linuxes:\n  - reads the output of `xdg-mime query default x-scheme-handler/http`\n- OS X:\n  - delegated to [default-browser-id from Sindre Sorhus](https://github.com/sindresorhus/default-browser-id)\n\n## Usage as a nodejs module\n\n```sh\n$ npm install x-default-browser\n```\n\n```js\nvar defaultBrowser = require(\"x-default-browser\");\n\ndefaultBrowser(function (err, res) {\n  // in case of error, `err` will be a string with error message; otherwise it's `null`.\n\n  console.dir(res);\n  // => {\n  //  isIE: false,\n  //  isFirefox: true,\n  //  isChrome: false,\n  //  isChromium: false,\n  //  isOpera: false,\n  //  isWebkit: false,\n  //  identity: 'firefox.exe',\n  //  commonName: 'firefox'\n  // }\n});\n```\n\n- `commonName` is portable, it will be `ie`, `safari`, `firefox`, `chrome`, `chromium`, `opera` or `unknown`\n- `isBlink` is true for Chrome, Chromium, Opera\n- `isWebkit` is true for Chrome, Chromium, Opera, Safari\n- `identity` key is platform-specific.\n  - On Windows, it's the prefix you can use for querying `HKLM\\Software\\Clients\\StartMenuInternet\\<prefix>`\n    keys to find out details of the browser. It'll be one of `iexplore.exe`, `firefox.exe`, `google chrome`,\n    `chromium.<somerandomkeyhere>`, `operastable`.\n  - On Ubuntu, it will be `firefox.desktop`, `google-chrome.desktop`, `chromium-browser.desktop` or `opera.desktop`\n  - On Mac OS X, it will be the bundle ID: `com.apple.Safari`, `com.google.chrome`, `com.operasoftware.Opera`, `org.mozilla.firefox` etc\n\n## Usage from command line\n\n```sh\n$ npm install -g x-default-browser\n$ x-default-browser\nfirefox\n```\n\nCommand line version outputs the `commonName` key, i.e. `ie`, `safari`, `firefox`, `chrome`, `chromium`, `opera` or `unknown`.\n\n## Linux support\n\nThis module was only tested on Ubuntu. Compatibility reports and fixes for other distros are more than welcome!\nUse GitHub issues or email: (jakub.g.opensource) (gmail)\n\n## License\n\nMIT © [jakub-g](http://jakub-g.github.io)\n\n## Related projects\n\n- [default-browser-id](https://github.com/sindresorhus/default-browser-id) (OS X)\n- [win-detect-browsers](https://github.com/vweevers/win-detect-browsers) (Windows)\n- [browser-launcher2](https://github.com/benderjs/browser-launcher2) (cross-platform)\n- [opener](https://github.com/domenic/opener) (cross-platform)\n- [node-open](https://github.com/pwnall/node-open) (cross-platform)\n","_attachments":{},"homepage":"https://github.com/jakub-g/x-default-browser","bugs":{"url":"https://github.com/jakub-g/x-default-browser/issues"},"license":"MIT"}