Gathering detailed insights and metrics for win-detect-browsers
Gathering detailed insights and metrics for win-detect-browsers
Gathering detailed insights and metrics for win-detect-browsers
Gathering detailed insights and metrics for win-detect-browsers
Fast and native browser detection on Windows.
npm install win-detect-browsers
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
6,040,656
Last Day
284
Last Week
1,693
Last Month
7,011
Last Year
87,506
MIT License
39 Stars
219 Commits
15 Forks
3 Watchers
3 Branches
5 Contributors
Updated on May 17, 2024
Minified
Minified + Gzipped
Latest Version
7.0.0
Package Id
win-detect-browsers@7.0.0
Unpacked Size
42.25 kB
Size
12.79 kB
File Count
14
NPM Version
7.21.1
Node Version
16.9.1
Published on
Nov 12, 2021
Cumulative downloads
Total Downloads
Last Day
51.9%
284
Compared to previous day
Last Week
24%
1,693
Compared to previous week
Last Month
-4.5%
7,011
Compared to previous month
Last Year
-21.1%
87,506
Compared to previous year
10
4
Fast and native browser detection on Windows. Detects installed versions of Beaker, Brave, Chrome, Chromium, Firefox, Internet Explorer, Maxthon, Opera, Safari and Yandex.
If you are upgrading: please see the changelog.
1const detect = require('win-detect-browsers') 2 3// All browsers 4detect(function (err, browsers) { 5 if (err) throw err 6 console.log(browsers) 7}) 8 9// All browsers with promise 10const browsers = await detect() 11 12// Search only for Chrome and Firefox 13detect(['chrome', 'firefox'], function (err, browsers) { 14 if (err) throw err 15 16 for (let b of browsers) { 17 console.log(b.version) // '57.0.2931.0' 18 console.log(b.channel) // 'canary' 19 } 20})
detect([names][, callback])
names
is an array of browser names you want to find. If omitted or empty, it will detect everything. 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.
Each result
is an object with the following properties:
name
(string): chrome
, chromium
, firefox
, beaker
, brave
, ie
, msedge
, maxthon
, opera
, safari
, yandex
path
(string): absolute path to executableversion
(string)arch
(string): CPU type the executable was built for: amd64
, i386
or other;info
(object): executable metadata (see sample below).Additional properties are usually available but not guaranteed:
channel
(string):
stable
, canary
, beta
or dev
release
, developer
, nightly
or esr
aurora
, beta
or rc
;stable
, beta
or developer
.win-detect-browsers [options] [name, name..]
Write browsers to stdout as a JSON array. Includes all browsers unless one or more names are given (see list above).
Options:
--help
-h
: Show help--version
-v
: Show CLI version number--summary
-s
: Less properties;--debug
-d
: Enable debug output.On Windows 10:
1[ 2 { 3 "name": "ie", 4 "path": "C:\\Program Files\\Internet Explorer\\iexplore.exe", 5 "version": "11.0.17134.1", 6 "arch": "amd64", 7 "info": { 8 "FileVersion": "11.0.17134.1", 9 "CompanyName": "Microsoft Corporation", 10 "FileDescription": "Internet Explorer", 11 "InternalName": "iexplore", 12 "LegalCopyright": "© Microsoft Corporation. Alle rechten voorbehouden.", 13 "OriginalFilename": "IEXPLORE.EXE.MUI", 14 "ProductName": "Internet Explorer", 15 "ProductVersion": "11.00.17134.1" 16 } 17 }, 18 { 19 "name": "ie", 20 "path": "C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe", 21 "version": "11.0.17134.1", 22 "arch": "i386", 23 "info": { 24 "FileVersion": "11.0.17134.1", 25 "CompanyName": "Microsoft Corporation", 26 "FileDescription": "Internet Explorer", 27 "InternalName": "iexplore", 28 "LegalCopyright": "© Microsoft Corporation. Alle rechten voorbehouden.", 29 "OriginalFilename": "IEXPLORE.EXE.MUI", 30 "ProductName": "Internet Explorer", 31 "ProductVersion": "11.00.17134.1" 32 } 33 }, 34 { 35 "name": "firefox", 36 "path": "C:\\Program Files\\Mozilla Firefox\\firefox.exe", 37 "version": "61.0.0.6711", 38 "channel": "release", 39 "arch": "amd64", 40 "info": { 41 "FileVersion": "61.0.0.6711", 42 "LegalCopyright": "©Firefox and Mozilla Developers; available under the MPL 2 license.", 43 "CompanyName": "Mozilla Corporation", 44 "FileDescription": "Firefox", 45 "ProductVersion": "61.0", 46 "InternalName": "Firefox", 47 "LegalTrademarks": "Firefox is a Trademark of The Mozilla Foundation.", 48 "OriginalFilename": "../../dist/bin/firefox.exe", 49 "ProductName": "Firefox", 50 "BuildID": "20180517141400" 51 } 52 }, 53 { 54 "name": "firefox", 55 "path": "C:\\Program Files\\Firefox Developer Edition\\firefox.exe", 56 "version": "61.0.0.6711", 57 "channel": "developer", 58 "arch": "amd64", 59 "info": { 60 "FileVersion": "61.0.0.6711", 61 "LegalCopyright": "©Firefox and Mozilla Developers; available under the MPL 2 license.", 62 "CompanyName": "Mozilla Corporation", 63 "FileDescription": "Firefox Developer Edition", 64 "ProductVersion": "61.0", 65 "InternalName": "Firefox Developer Edition", 66 "LegalTrademarks": "Firefox is a Trademark of The Mozilla Foundation.", 67 "OriginalFilename": "../../dist/bin/firefox.exe", 68 "ProductName": "Firefox Developer Edition", 69 "BuildID": "20180517141400" 70 } 71 }, 72 { 73 "name": "firefox", 74 "path": "C:\\Program Files\\Firefox Nightly\\firefox.exe", 75 "version": "62.0.0.6712", 76 "channel": "nightly", 77 "arch": "amd64", 78 "info": { 79 "FileVersion": "62.0.0.6712", 80 "LegalCopyright": "©Firefox and Mozilla Developers; available under the MPL 2 license.", 81 "CompanyName": "Mozilla Corporation", 82 "FileDescription": "Firefox Nightly", 83 "ProductVersion": "62.0a1", 84 "InternalName": "Firefox Nightly", 85 "LegalTrademarks": "Firefox is a Trademark of The Mozilla Foundation.", 86 "OriginalFilename": "firefox.exe", 87 "ProductName": "Firefox Nightly", 88 "BuildID": "20180518222751" 89 } 90 }, 91 { 92 "name": "chrome", 93 "path": "C:\\Users\\vweevers\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe", 94 "version": "68.0.3436.0", 95 "channel": "canary", 96 "arch": "amd64", 97 "info": { 98 "FileVersion": "68.0.3436.0", 99 "CompanyName": "Google Inc.", 100 "FileDescription": "Google Chrome", 101 "InternalName": "chrome_exe", 102 "LegalCopyright": "Copyright 2017 Google Inc. All rights reserved.", 103 "OriginalFilename": "chrome.exe", 104 "ProductName": "Google Chrome", 105 "ProductVersion": "68.0.3436.0", 106 "CompanyShortName": "Google", 107 "ProductShortName": "Chrome", 108 "LastChange": "e0f81fe637f233bf12e821915b72bc8d2194c3f2-refs/branch-heads/3436@{#1}", 109 "Official Build": "1" 110 } 111 }, 112 { 113 "name": "chrome", 114 "path": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", 115 "version": "66.0.3359.181", 116 "channel": "stable", 117 "arch": "amd64", 118 "info": { 119 "FileVersion": "66.0.3359.181", 120 "CompanyName": "Google Inc.", 121 "FileDescription": "Google Chrome", 122 "InternalName": "chrome_exe", 123 "LegalCopyright": "Copyright 2017 Google Inc. All rights reserved.", 124 "OriginalFilename": "chrome.exe", 125 "ProductName": "Google Chrome", 126 "ProductVersion": "66.0.3359.181", 127 "CompanyShortName": "Google", 128 "ProductShortName": "Chrome", 129 "LastChange": "a10b9cedb40738cb152f8148ddab4891df876959-refs/branch-heads/3359@{#828}", 130 "Official Build": "1" 131 } 132 }, 133 { 134 "name": "opera", 135 "path": "C:\\Program Files\\Opera beta\\Launcher.exe", 136 "version": "53.0.2907.31", 137 "channel": "beta", 138 "arch": "amd64", 139 "info": { 140 "FileVersion": "53.0.2907.31", 141 "LegalCopyright": "Copyright Opera Software 2018", 142 "InternalName": "Opera", 143 "CompanyName": "Opera Software", 144 "ProductName": "Opera beta Internet Browser", 145 "ProductVersion": "53.0.2907.31", 146 "FileDescription": "Opera beta Internet Browser" 147 } 148 } 149]
With npm do:
1npm install win-detect-browsers # For API 2npm install win-detect-browsers -g # For CLI
Browser 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, Google Updater and more), and looks in PATH
. Version numbers are then read from the executable metadata.
browser-launcher
by substack has poor Windows support, and it prompted me to create this module. It is now used in browser-launcher2, an active a once active fork of browser-launcher
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 3/24 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-04-28
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More