# chrome-helper

> A helper class for cyrus-and/chrome-remote-interface

Latest version **1.0.0** (published 2016-08-02) · Apache-2.0 license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2016-08-02 |
| First published | 2016-07-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Garth Braithwaite |
| Maintainers | garthdb |
| Keywords | topmarks, chrome |

## Links

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

## Dependencies (1)

- [chrome-remote-interface](https://npm.io/package/chrome-remote-interface.md) ^0.12.3

## Recent versions

- 1.0.0 (latest) — 2016-08-02
- 0.2.0 — 2016-07-24
- 0.1.2 — 2016-07-23
- 0.1.1 — 2016-07-23
- 0.1.0 — 2016-07-23

## README

# ChromeHelper

[![Build Status](https://travis-ci.org/Topmarks/chrome-helper.svg?branch=master)](https://travis-ci.org/Topmarks/chrome-helper) [![Code Climate](https://codeclimate.com/github/Topmarks/chrome-helper/badges/gpa.svg)](https://codeclimate.com/github/Topmarks/chrome-helper) [![Test Coverage](https://codeclimate.com/github/Topmarks/chrome-helper/badges/coverage.svg)](https://codeclimate.com/github/Topmarks/chrome-helper/coverage) [![Issue Count](https://codeclimate.com/github/Topmarks/chrome-helper/badges/issue_count.svg)](https://codeclimate.com/github/Topmarks/chrome-helper) [![Dependency Status](https://david-dm.org/Topmarks/chrome-helper.svg)](https://david-dm.org/Topmarks/chrome-helper) [![Inline docs](http://inch-ci.org/github/Topmarks/chrome-helper.svg?branch=master)](http://inch-ci.org/github/Topmarks/chrome-helper) [![npm version](https://badge.fury.io/js/chrome-helper.svg)](https://badge.fury.io/js/chrome-helper)

A helper class for [cyrus-and/chrome-remote-interface](https://github.com/cyrus-and/chrome-remote-interface)

Primarily designed to reduce repeated code in [Topmarks](http://github.com/Topmarks/chrome-helper) plugins.

## Usage

Create a new instance of the `ChromeHelper` and pass the `port` and `url` to the constructor.

```js
var chromeHelper = new ChromeHelper(options.port, options.url);
```

Use `startupChrome()` to connect and open a new tab.

## Plugin Example

```js
var ChromeHelper = require('chrome-helper');

var samplePlugin = function samplePlugin(app, options) {
  var chromeHelper = new ChromeHelper(options.port, options.url);
  return chromeHelper.startupChrome().then(function (results) {
    // Do some stuff
    return Promise.resolve(results);
  }).then(function () {
    return chromeHelper.shutdownChrome();
  }).catch(console.log);
};

samplePlugin.attributes = {
  name: 'samplePlugin'
};

module.exports = samplePlugin;
```

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