{"name":"win-detect-browsers","version":"6.0.0","description":"Fast and native browser detection on Windows","author":{"name":"Vincent Weevers"},"license":"MIT","main":"index.js","bin":{"win-detect-browsers":"cli.js"},"scripts":{"test":"standard && hallmark && node test.js","hallmark":"hallmark --fix"},"dependencies":{"after":"^0.8.2","chalk":"^3.0.0","debug":"^4.1.0","existent":"^1.0.1","pascal-case":"^3.1.1","pe-machine-type":"^1.0.0","pretty-tree":"^1.0.0","registry-js":"^1.9.0","which":"^2.0.1","win-version-info":"^3.0.0","windows-env":"^1.0.1","xtend":"^4.0.0","yargs":"^15.0.1"},"devDependencies":{"hallmark":"^2.0.0","standard":"^14.1.0","tape":"^4.10.1","win-dummy-exe":"0.0.1"},"repository":{"type":"git","url":"git+https://github.com/vweevers/win-detect-browsers.git"},"bugs":{"url":"https://github.com/vweevers/win-detect-browsers/issues"},"homepage":"https://github.com/vweevers/win-detect-browsers","keywords":["browser","browsers","detect","windows","chrome","chromium","canary","firefox","ie","internet-explorer","safari","opera","maxthon","yandex"],"engines":{"node":">=8"},"gitHead":"aecb4d2d6f58d197bcbc52ada6b050882e1150b0","_id":"win-detect-browsers@6.0.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","_npmUser":{"name":"vweevers","email":"dev@vincentweevers.nl"},"maintainers":[{"name":"vweevers","email":"dev@vincentweevers.nl"}],"dist":{"integrity":"sha512-XY5PnXR5HhgbxByEPA6V8cQXKH+cZe4qQ3qov0pYU+0YuL/QMq6AKmQyAkeNzI4HOPRdrz0KwzwXR3gi7YvJEg==","shasum":"397de40d48fa2fe3702e9f8771b3737ad2c493b6","tarball":"http://registry-npm.ywwl.com/win-detect-browsers/download/win-detect-browsers-6.0.0.tgz","fileCount":14,"unpackedSize":44538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYCUqCRA9TVsSAnZWagAAA+4P/3bkOZwKw/PIxdFDTFEl\n7v3OWwgGwtKTNHc0rZniy6kYRnG8t5wywwndKl5zadzztxOKiMc30A47Ri9D\n0KTC+eEWL1rems/lXFj8/CoBzVoj2dSQWQ1LYxYl4bBONDjBtC5LURiujiR9\nQZODadDX1tfG2DhzwbjIcxk67KocSN1Cbn44QScDp17f7CjZjA8q4wM/vj5k\nu1JfdNnkK4MUEhkPRc35+3aI8PKnxPhuco/0qmg7qSdy8VDWoUr17PGljQXJ\nwk4xEkpIkVlo62HSullcEQC+wLOLofPSNYPUOLXP74AYBbuinnidaNp2sKBB\n7aH/j7h7rutymfjl2DvFwQ2pUow/jA5ade8EweWxBVsrQrCcUGvei1z8N7j5\nzRwY4OvE8YjGB9S1V7AOEUNiogzsLFW0/N50Q/HiNDaxcFVa7CM75ezB8Yaq\ns6yreJmahCJuZeJdMmFY3P+nqqHQ3jAl9+elyazxfWvy8kXmnz579qTobdLm\nD1Wmk3S8i7T6t6YZQ1ziF/sNWTcf22frs2eIjtlZGQGiCAGNtXLNNHKqp0A3\nzoxRIfaLjdpUpvu3R66cJUJy+tQYBpAVYvSRUtMaCCDCrerVh3QXOV7PQM+3\nycvji95WpjsQtQuA/Dm10mMGJNYdkcZYlZlKZw2ImCYxAwfh8ykmikcdEjr7\nxmYJ\r\n=M5Cs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDskOT3iP01jOknhD0fEF2m4NAGIjqNuD0f49AmL1PwgAIgdypmU956V8URmnGWAjwpCYwGN2uwmoFXMaua1wrbtco="}],"size":13567,"noattachment":false,"key":"/win-detect-browsers/-/win-detect-browsers-6.0.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/win-detect-browsers_6.0.0_1583359273941_0.11855510699150495"},"_hasShrinkwrap":false,"readme":"# win-detect-browsers\n\n**Fast and native browser detection on Windows. Detects installed versions of [Beaker](https://beakerbrowser.com/), [Brave](https://brave.com/), [Chrome](https://www.google.com/chrome/), [Chromium](https://www.chromium.org/), [Firefox](https://www.mozilla.org/en-US/firefox/), [Internet Explorer](https://en.wikipedia.org/wiki/Internet_Explorer), [Maxthon](http://www.maxthon.com/), [Opera](https://www.opera.com/), [Safari](https://www.apple.com/safari/) and [Yandex](https://browser.yandex.com/).**\n\n[![npm](https://img.shields.io/npm/v/win-detect-browsers.svg)](https://www.npmjs.com/package/win-detect-browsers)\n[![Node version](https://img.shields.io/node/v/win-detect-browsers.svg)](https://www.npmjs.com/package/win-detect-browsers)\n[![Test](https://img.shields.io/github/workflow/status/vweevers/win-detect-browsers/Test?label=test)](https://github.com/vweevers/win-detect-browsers/actions/workflows/test.yml)\n[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript&logoColor=fff)](https://standardjs.com)\n[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)\n\n## Table of Contents\n\n<details><summary>Click to expand</summary>\n\n- [Usage](#usage)\n- [API](#api)\n  - [`detect([names][, callback])`](#detectnames-callback)\n- [CLI](#cli)\n  - [Sample](#sample)\n- [Install](#install)\n- [Background](#background)\n- [License](#license)\n\n</details>\n\n## Usage\n\n_If you are upgrading: please see the [changelog](CHANGELOG.md)._\n\n```js\nconst detect = require('win-detect-browsers')\n\n// All browsers\ndetect(function (err, browsers) {\n  if (err) throw err\n  console.log(browsers)\n})\n\n// All browsers with promise\nconst browsers = await detect()\n\n// Search only for Chrome and Firefox\ndetect(['chrome', 'firefox'], function (err, browsers) {\n  if (err) throw err\n\n  for (let b of browsers) {\n    console.log(b.version) // '57.0.2931.0'\n    console.log(b.channel) // 'canary'\n  }\n})\n```\n\n## API\n\n### `detect([names][, callback])`\n\n`names` is an array of browser names you want to find. If omitted or empty, it will detect _[everything](http://youtu.be/k1yvvNvlXtg)_. The `callback` receives an error if any and an array of `results`. A result is excluded if its path has no `.exe` extension or if its version could not be read. If no callback is provided, a promise is returned.\n\nEach `result` is an object with the following properties:\n\n- `name` (string): `chrome`, `chromium`, `firefox`, `beaker`, `brave`, `ie`, `msedge`, `maxthon`, `opera`, `safari`, `yandex`\n- `path` (string): absolute path to executable\n- `version` (string)\n- `arch` (string): CPU type the executable was built for: `amd64`, `i386` or [other](https://github.com/vweevers/pe-machine-type#types);\n- `info` (object): executable metadata (see [sample](#sample) below).\n\nAdditional properties are usually available but not guaranteed:\n\n- `channel` (string):\n  - Chrome: `stable`, `canary`, `beta` or `dev`\n  - Firefox: `release`, `developer`, `nightly` or [`esr`](https://www.mozilla.org/en-US/firefox/organizations/faq/)\n  - Older versions of Firefox: `aurora`, `beta` or `rc`;\n  - Opera: `stable`, `beta` or `developer`.\n\n## CLI\n\n```\nwin-detect-browsers [options] [name, name..]\n```\n\nWrite browsers to stdout as a JSON array. Includes all browsers unless one or more names are given (see list above).\n\nOptions:\n\n- `--help` `-h`: Show help\n- `--version` `-v`: Show CLI version number\n- `--summary` `-s`: Less properties;\n- `--debug` `-d`: Enable debug output.\n\n### Sample\n\nOn Windows 10:\n\n<details><summary>Click to expand</summary>\n\n```json\n[\n  {\n    \"name\": \"ie\",\n    \"path\": \"C:\\\\Program Files\\\\Internet Explorer\\\\iexplore.exe\",\n    \"version\": \"11.0.17134.1\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"11.0.17134.1\",\n      \"CompanyName\": \"Microsoft Corporation\",\n      \"FileDescription\": \"Internet Explorer\",\n      \"InternalName\": \"iexplore\",\n      \"LegalCopyright\": \"© Microsoft Corporation. Alle rechten voorbehouden.\",\n      \"OriginalFilename\": \"IEXPLORE.EXE.MUI\",\n      \"ProductName\": \"Internet Explorer\",\n      \"ProductVersion\": \"11.00.17134.1\"\n    }\n  },\n  {\n    \"name\": \"ie\",\n    \"path\": \"C:\\\\Program Files (x86)\\\\Internet Explorer\\\\iexplore.exe\",\n    \"version\": \"11.0.17134.1\",\n    \"arch\": \"i386\",\n    \"info\": {\n      \"FileVersion\": \"11.0.17134.1\",\n      \"CompanyName\": \"Microsoft Corporation\",\n      \"FileDescription\": \"Internet Explorer\",\n      \"InternalName\": \"iexplore\",\n      \"LegalCopyright\": \"© Microsoft Corporation. Alle rechten voorbehouden.\",\n      \"OriginalFilename\": \"IEXPLORE.EXE.MUI\",\n      \"ProductName\": \"Internet Explorer\",\n      \"ProductVersion\": \"11.00.17134.1\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe\",\n    \"version\": \"61.0.0.6711\",\n    \"channel\": \"release\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"61.0.0.6711\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox\",\n      \"ProductVersion\": \"61.0\",\n      \"InternalName\": \"Firefox\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"../../dist/bin/firefox.exe\",\n      \"ProductName\": \"Firefox\",\n      \"BuildID\": \"20180517141400\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Firefox Developer Edition\\\\firefox.exe\",\n    \"version\": \"61.0.0.6711\",\n    \"channel\": \"developer\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"61.0.0.6711\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox Developer Edition\",\n      \"ProductVersion\": \"61.0\",\n      \"InternalName\": \"Firefox Developer Edition\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"../../dist/bin/firefox.exe\",\n      \"ProductName\": \"Firefox Developer Edition\",\n      \"BuildID\": \"20180517141400\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Firefox Nightly\\\\firefox.exe\",\n    \"version\": \"62.0.0.6712\",\n    \"channel\": \"nightly\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"62.0.0.6712\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox Nightly\",\n      \"ProductVersion\": \"62.0a1\",\n      \"InternalName\": \"Firefox Nightly\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"firefox.exe\",\n      \"ProductName\": \"Firefox Nightly\",\n      \"BuildID\": \"20180518222751\"\n    }\n  },\n  {\n    \"name\": \"chrome\",\n    \"path\": \"C:\\\\Users\\\\vweevers\\\\AppData\\\\Local\\\\Google\\\\Chrome SxS\\\\Application\\\\chrome.exe\",\n    \"version\": \"68.0.3436.0\",\n    \"channel\": \"canary\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"68.0.3436.0\",\n      \"CompanyName\": \"Google Inc.\",\n      \"FileDescription\": \"Google Chrome\",\n      \"InternalName\": \"chrome_exe\",\n      \"LegalCopyright\": \"Copyright 2017 Google Inc. All rights reserved.\",\n      \"OriginalFilename\": \"chrome.exe\",\n      \"ProductName\": \"Google Chrome\",\n      \"ProductVersion\": \"68.0.3436.0\",\n      \"CompanyShortName\": \"Google\",\n      \"ProductShortName\": \"Chrome\",\n      \"LastChange\": \"e0f81fe637f233bf12e821915b72bc8d2194c3f2-refs/branch-heads/3436@{#1}\",\n      \"Official Build\": \"1\"\n    }\n  },\n  {\n    \"name\": \"chrome\",\n    \"path\": \"C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n    \"version\": \"66.0.3359.181\",\n    \"channel\": \"stable\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"66.0.3359.181\",\n      \"CompanyName\": \"Google Inc.\",\n      \"FileDescription\": \"Google Chrome\",\n      \"InternalName\": \"chrome_exe\",\n      \"LegalCopyright\": \"Copyright 2017 Google Inc. All rights reserved.\",\n      \"OriginalFilename\": \"chrome.exe\",\n      \"ProductName\": \"Google Chrome\",\n      \"ProductVersion\": \"66.0.3359.181\",\n      \"CompanyShortName\": \"Google\",\n      \"ProductShortName\": \"Chrome\",\n      \"LastChange\": \"a10b9cedb40738cb152f8148ddab4891df876959-refs/branch-heads/3359@{#828}\",\n      \"Official Build\": \"1\"\n    }\n  },\n  {\n    \"name\": \"opera\",\n    \"path\": \"C:\\\\Program Files\\\\Opera beta\\\\Launcher.exe\",\n    \"version\": \"53.0.2907.31\",\n    \"channel\": \"beta\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"53.0.2907.31\",\n      \"LegalCopyright\": \"Copyright Opera Software 2018\",\n      \"InternalName\": \"Opera\",\n      \"CompanyName\": \"Opera Software\",\n      \"ProductName\": \"Opera beta Internet Browser\",\n      \"ProductVersion\": \"53.0.2907.31\",\n      \"FileDescription\": \"Opera beta Internet Browser\"\n    }\n  }\n]\n```\n\n</details>\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install win-detect-browsers     # For API\nnpm install win-detect-browsers -g  # For CLI\n```\n\n## Background\n\nBrowser detection on Windows can't be done right. This is the _try-everything-and-fail-silently_ approach. It accounts for architecture differences, normalizes environment variables, tries default locations, searches the registry (in the HKLM and HKCU hives as well as WoW counterparts) (including [Start Menu Internet Applications](http://msdn.microsoft.com/en-us/library/windows/desktop/dd203067(v=vs.85).aspx), Google Updater and more), and looks in `PATH`. Version numbers are then read from the executable metadata.\n\n`browser-launcher` by substack has [poor Windows support](https://github.com/substack/browser-launcher/issues/7), and it prompted me to create this module. It is now used in [browser-launcher2](https://github.com/benderjs/browser-launcher2), ~~an active~~ a once active fork of `browser-launcher`.\n\n## License\n\n[MIT](./LICENSE)\n","publish_time":1583359274098,"_cnpm_publish_time":1583359274098,"dist-tags":{"latest":"8.0.3","next":"3.0.0-rc1"}}