get-browser-path

1.1.0 • Public • Published

Get-Browser-Path

NPM version NPM downloads MIT License

very simple package to get the path of the browser currently (chrome and edge) only
works for all operating systems (windows, mac, linux)

const getBrowserPath = require('get-browser-path');

console.log(getBrowserPath('chrome')); // /Applications/Google Chrome.app/Contents/MacOS/Google Chrome (if found) 
console.log(getBrowserPath('edge')); // /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge (if found)
console.log(getBrowserPath()); // will return the path of edg if found else it will return chrome chrome

console.log(getBrowserPath()); // will return null if no browser found

Package Sidebar

Install

npm i get-browser-path

Weekly Downloads

7

Version

1.1.0

License

MIT

Unpacked Size

6.17 kB

Total Files

6

Last publish

Collaborators

  • abdelrahman-tarek