Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chrome-paths

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-paths

Possible paths or binary names of Chrome, Chrome Canary and Chromium in the current platform

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

chrome-paths

npm version Build Status

Possible paths or binary names of Chrome, Chrome Canary and Chromium in the current platform

const chromePaths = require('chrome-paths');

// On macOS

chromePaths.chrome; //=> '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
chromePaths.chromeCanary; //=> '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'
chromePaths.chromium; //=> '/Applications/Chromium.app/Contents/MacOS/Chromium'

// On Linux

chromePaths.chrome; //=> 'google-chrome'
chromePaths.chromeCanary; //=> null
chromePaths.chromium; //=> 'chromium'

// On Windows

chromePaths.chrome; //=> 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'
chromePaths.chromeCanary; //=> 'C:\\Program Files (x86)\\Google\\Chrome SxS\\Application\\chrome.exe'
chromePaths.chromium //=> 'C:\\Program Files (x86)\\Chromium\\Application\\chrome.exe'

// On Solaris

chromePaths.chrome; //=> null
chromePaths.chromeCanary; //=> null
chromePaths.chromium; //=> null

Installation

Use npm.

npm install chrome-paths

API

const chromePaths = require('chrome-paths');

chromePaths.chrome, chromePaths.chromeCanary, chromePaths.chromium

Type: string or null

const {execFile} = require('child_process');
const {promisify} = require('util');
const {chrome, chromeCanary} = require('chrome-paths');

(async () => {
  (await promisify(execFile)(chrome, ['--version'])).stdout; //=> 'Google Chrome 71.0.3578.98 \n'
  (await promisify(execFile)(chromeCanary, ['--version'])).stdout; //=> 'Google Chrome 74.0.3689.0 canary\n'
})();

Whether each property is a full path, just a binary name or null depends on the current platform.

License

ISC License © 2018 - 2019 Shinnosuke Watanabe

Keywords

FAQs

Package last updated on 06 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc