Find Google Chrome on your system
npm install locate-chromeFind Google Chrome on your system.
Based on chrome-location.
``js`
var locateChrome = require('locate-chrome');
// Use a callback
locateChrome(function(l) {
console.log(l);
});
// Use the returned Promise
locateChrome.then(function(l) {
console.log(l);
});
stdout path to Chrome (or null):`bash`
> locate-chrome/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Open Chrome (you'll need to use quotes if Chrome's path has spaces in it):
`bashlocate-chrome
> ""``