mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
* chore: split out more packages - `npm run format` to fix eslint issues - fix repo links on parser packages - ensure we're always rebuilding c++ on CI - `@serialport/binding-abstract` as an abstract class for all bindings - `@serialport/binding-mock` for a mock binding package - `@serialport/stream` for our traditional stream interface - `@serialport/bindings` for working with osx, windows and linux OS serialports |
||
|---|---|---|
| .. | ||
| .npmignore | ||
| package.json | ||
| README.md | ||
| stream.js | ||
| stream.test.js | ||
@serialport/Stream
The serialport stream interface. This package requires bindings to work.
You'd use this if you want to keep your package size down by requiring only the parts of serialport that you want to use. It is used internally in the serialport package.
This is how you use it.
const SerialPort = require('@serialport/stream')
const Binding = require('@serialport/bindings')
SerialPort.Binding = Binding
const port = new Serialport('/dev/ttyay')