get-browser-path
v1.1.0
Published
[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-downloads-url] [![MIT License][license-image]][license-url]
Downloads
5
Maintainers
Readme
Get-Browser-Path
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