{"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","tarball":"http://registry-npm.ywwl.com/x-default-browser/download/x-default-browser-0.3.0.tgz","integrity":"sha512-Agtr0syV1FvzJMUfqkXoqlBxKh+dB3jXVPGc6PJpn7lxMmQYCNC9YfFvSzFqzyQd2dx+NxABtVweKJYzdQHoLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAgNf9ugjyG7H4w6E+efM2NG7vGwtTxXQh7QvlBzDETbAiAu3VDYffivs6WzKFTghCACXXK/NyFSsQuOVPAnbxnS2A=="}],"size":5306,"noattachment":false,"key":"/x-default-browser/-/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":{},"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","publish_time":1421425386700,"_cnpm_publish_time":1421425386700,"dist-tags":{"latest":"0.5.2"}}