# chrome-paths

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

Latest version **1.0.1** (published 2019-02-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install chrome-paths
pnpm add chrome-paths
yarn add chrome-paths
bun add chrome-paths
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-02-06 |
| First published | 2018-07-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | chrome, chromium, canary, darwin, macos, linux, windown, cross-platform, path, paths, locate, location, executable |

## Links

- npm: https://www.npmjs.com/package/chrome-paths
- Repository: https://github.com/shinnn/chrome-paths
- Homepage: https://github.com/shinnn/chrome-paths#readme
- Issues: https://github.com/shinnn/chrome-paths/issues
- npm.io page: https://npm.io/package/chrome-paths

## Dependencies (1)

- [karma-chrome-launcher](https://npm.io/package/karma-chrome-launcher.md) ^2.2.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-02-06
- 1.0.0 — 2018-07-30
- 0.1.0 — 2018-07-26
- 0.0.0 — 2018-07-25

## README

# chrome-paths

[![npm version](https://img.shields.io/npm/v/chrome-paths.svg)](https://www.npmjs.com/package/chrome-paths)
[![Build Status](https://travis-ci.com/shinnn/chrome-paths.svg?branch=master)](https://travis-ci.com/shinnn/chrome-paths)

Possible paths or binary names of [Chrome](https://www.google.com/chrome/), [Chrome Canary](https://www.google.com/chrome/canary/) and [Chromium](https://www.chromium.org/Home) in the current platform

```javascript
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](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).

```
npm install chrome-paths
```

## API

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

### chromePaths.chrome, chromePaths.chromeCanary, chromePaths.chromium

Type: `string` or `null`

```javascript
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](https://nodejs.org/api/process.html#process_process_platform).

## License

[ISC License](./LICENSE) © 2018 - 2019 Shinnosuke Watanabe

---
_Source: https://npm.io/package/chrome-paths · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
