# serial-port-stream

> Serial port as a duplex stream

Latest version **0.1.0** (published 2014-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install serial-port-stream
pnpm add serial-port-stream
yarn add serial-port-stream
bun add serial-port-stream
```

## 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.1.0 |
| Published | 2014-04-28 |
| First published | 2014-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vladimir Kurchatkin |
| Maintainers | vkurchatkin |
| Keywords | serial, port, duplex, stream, browser, chrome, browserify |

## Links

- npm: https://www.npmjs.com/package/serial-port-stream
- Repository: https://github.com/vkurchatkin/serial-port-stream
- Issues: https://github.com/vkurchatkin/serial-port-stream/issues
- npm.io page: https://npm.io/package/serial-port-stream

## Dependencies (3)

- [mocha](https://npm.io/package/mocha.md) ^1.18.2
- [should](https://npm.io/package/should.md) ^3.3.0
- [serialport](https://npm.io/package/serialport.md) ^1.3.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-04-28
- 0.0.0 — 2014-04-09

## README

# serial-port-stream

Serial port as a duplex stream.

Works in node via [node-serialport](https://github.com/voodootikigod/node-serialport)
and in chrome with [browserify](https://github.com/substack/node-browserify) via [chrome.serial](https://developer.chrome.com/apps/serial)

# Features:

 - auto open;
 - auto close;
 - real `Duplex` stream;
 - work with browserify in chrome extensions and apps.

# Install

```
npm install serial-port-stream
```

and then:

```javascript
var SerialPortStream = require('serial-port-stream');
```

# Usage:

 - `new SerialPortStream(path, options)` or
 - `SerialPortStream(path, options)`;

## Options:

 - `autoClose` — auto close on `finish`, `true` by default;
 - `baudRate`;
 - `dataBits`;
 - `stopBits`;
 - `parity`.

## Methods:

 - `close`;
 - `destroy`.

Just like `fs` streams.

## Events:

 - `open`;
 - `close`;
 - `error`.

# Example:

```javascript
var SerialPortStream = require('serial-port-stream');
var stream = new SerialPortStream('/dev/ttyUSB0', { baudRate : 9600 });

stream.end('Hello world!\n');
```

# License

MIT

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