https://github.com/cityssm/node-web-browser-info
Retrieves details about installed web browsers.
https://github.com/cityssm/node-web-browser-info
chrome firefox web-browser
Last synced: 6 months ago
JSON representation
Retrieves details about installed web browsers.
- Host: GitHub
- URL: https://github.com/cityssm/node-web-browser-info
- Owner: cityssm
- License: mit
- Created: 2024-03-28T12:42:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T06:28:20.000Z (over 1 year ago)
- Last Synced: 2025-06-03T22:43:50.080Z (about 1 year ago)
- Topics: chrome, firefox, web-browser
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@cityssm/web-browser-info
- Size: 391 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Web Browser Info
[](https://www.npmjs.com/package/@cityssm/web-browser-info)
[](https://app.deepsource.com/gh/cityssm/node-web-browser-info/)
[](https://codeclimate.com/github/cityssm/node-web-browser-info/maintainability)
[](https://codecov.io/gh/cityssm/node-web-browser-info)
[](https://github.com/cityssm/node-web-browser-info/actions/workflows/coverage.yml)
Retrieves details about installed web browsers,
using the fantastic [@httptoolkit/browser-launcher](https://www.npmjs.com/package/@httptoolkit/browser-launcher) package.
Provides helper functions to filter the returned browsers by type and version.
## Installation
```sh
npm install @cityssm/web-browser-info
```
## Usage
```javascript
import {
chromeWebBrowserTypes,
getInstalledWebBrowsers
} from '@cityssm/web-browser-info'
// Get all web browsers
const allWebBrowsers = await getInstalledWebBrowsers()
// Get all Firefox web browsers
const firefoxWebBrowsers = await getInstalledWebBrowsers('firefox')
// Get all Chrome-based (chrome or chromium) web browsers
const chromeWebBrowsers = await getInstalledWebBrowsers(chromeWebBrowserTypes)
// Get all Firefox web browsers newer than version 100
const newerFirefoxWebBrowsers = await getInstalledWebBrowsers('firefox', 100)
```
## Sample Output
```javascript
[
{
name: 'msedge',
version: '122.0.2365.92',
type: 'msedge',
command: 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe',
majorVersion: 122,
minorVersion: 0
},
{
name: 'ie',
version: '11.00.22621.1',
type: 'ie',
command: 'C:\\Program Files\\Internet Explorer\\iexplore.exe',
majorVersion: 11,
minorVersion: 0
},
{
name: 'ie',
version: '11.00.22621.1',
type: 'ie',
command: 'C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe',
majorVersion: 11,
minorVersion: 0
},
{
name: 'chrome',
version: '123.0.6312.86',
type: 'chrome',
command: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
majorVersion: 123,
minorVersion: 0
},
{
name: 'firefox',
version: '124.0.1',
type: 'firefox',
command: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe',
majorVersion: 124,
minorVersion: 0
}
]
```