1.1.0 • Published 1 year ago

get-browser-path v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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