{"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":{"integrity":"sha512-6ZCYbJ7JQcgh7uIYeVqI0l8dMKuD+0qFP/2VqJ8yBCm7wueWLRr5aYcN4fqsAdrFkkjiJRiQ+2yQcqLf+itcZA==","shasum":"44415336d08538da94c1dbc3596f86fe33d673bd","tarball":"http://registry-npm.ywwl.com/x-default-browser/download/x-default-browser-0.5.0.tgz","fileCount":18,"unpackedSize":26454,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0GRlI5ArkOO59u0iwj8nqePtN1iEPZ4pwnzg7X/hm3wIgCwLdOMsK69ySsuWJCNRtOaJc5olun4lG3pNDeEdG08o="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcUR5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLAA//Uge26UTFKX+PPTcPdPnKi8/2lty8bBpy1cpJ1b4xBXOz9KDU\r\nzJinzXPQUN6bv7uyJ+fRbF9XSL5muWc7wzi3mPubysQrVwWyha+n2WKbcJU5\r\nxieMpCWBdT+QxAz9G5BsfJTGD8K8kIu2jZ5GF5jslVmIiGKIhVhx0uTxI5N7\r\nn9mF8ZQ9ekk63aQOmwThU2p42/GFjEDY9ZRBMnuM1d9DGOEOaTTmTNbhFbo3\r\nE39SgKe4f1mz6m+83Bp8VafyoH5WqNNx50lbzrli0Elb6yrfpWsB8UvjNSBv\r\nGFue9augVFWLK3VvthNtdMoXdum9DAb0B218O3/YQOR0rl9SLBNXopADWJah\r\nGrWPmV8TbkSZgjn/CJ3C2yRPU3tbEsUE3MoJV4T7/sPjWJ5+E7gB8Kp4Y+Hf\r\nPFF4UNg6zPO4SzzY82ABaQzod400z3OaPJmDHWyO8rZtICszR10mB2Qlxbwt\r\nEtn0KJDVd27T05Dhtu1leAfhRp0nQpmVQqpg3fkVYEhWmMdnMhpl1pU72KX6\r\nSP5eqONzAJBPbATJMXzhi+1HLWcmMvov4Vn0rBmgC3NgJnVEqDeZf2uFMWCK\r\nPCn7CLIgqgrU5zCPqUT36LFRVAD6z/GwPWSEaHtz1rBlLxwK4iy0qIxxI9+7\r\nE+io/vK1U675IC+emlMydGvGSjQKvpGnx7s=\r\n=E+yq\r\n-----END PGP SIGNATURE-----\r\n","size":5983,"noattachment":false,"key":"/x-default-browser/-/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,"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":1668367480972,"_cnpm_publish_time":1668367480972,"dist-tags":{"latest":"0.5.2"}}