# livereload-protocol

> LiveReload protocol parser

Latest version **0.2.2** (published 2012-10-09) · 0 weekly downloads

## Install

```sh
npm install livereload-protocol
pnpm add livereload-protocol
yarn add livereload-protocol
bun add livereload-protocol
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2012-10-09 |
| First published | 2012-07-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Andrey Tarantsov |
| Maintainers | andreyvit |

## Links

- npm: https://www.npmjs.com/package/livereload-protocol
- Repository: https://github.com/andreyvit/livereload_protocol
- npm.io page: https://npm.io/package/livereload-protocol

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) ~0.7.0

## Recent versions

- 0.2.2 (latest) — 2012-10-09
- 0.2.1 — 2012-07-28
- 0.2.0 — 2012-07-27
- 0.1.0 — 2012-07-27

## README

# LiveReload protocol parser

Handles [LiveReload protocol](http://help.livereload.com/kb/ecosystem/livereload-protocol) handshake, validates and parses incoming commands, validates outgoing commands.

## Synopsis

    var Parser = require('livereload-parser');
    parser = new Parser('server', { monitoring: [Parser.protocols.MONITORING_7] });
    parser.on('error', function(err) {
      console.error('Error %s when parsing incoming message: %s', err.code, err.message);
      mywebsocket.close();
    });
    parser.on('connected', function() {
      console.log('Handshake done! Protocols: %j', parser.negotiatedProtocols);
      if (parser.negotiatedProtocols.monitoring >= 7) {
        console.log('TODO: activate monitoring here');
      }
    });
    parser.on('command', function(message) {
      console.log('Incoming command %s, data %j', message.command, message);
    });
    mywebsocket.on('data', function(data) {
      parser.received(data);
    });

## Installation

    npm install livereload-protocol

## Running tests

    npm test

## License

© 2012, Andrey Tarantsov, distributed under the MIT license.

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