Socket
Socket
Sign inDemoInstall

serialport

Package Overview
Dependencies
Maintainers
3
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialport - npm Package Compare versions

Comparing version 6.0.0-beta2 to 6.0.0-beta3

lib/parsers/cctalk.js

16

CHANGELOG.md

@@ -0,1 +1,17 @@

<a name="6.0.0-beta3"></a>
# [6.0.0-beta3](https://github.com/EmergingTechnologyAdvisors/node-serialport/compare/v6.0.0-beta2...v6.0.0-beta3) (2017-10-07)
### Bug Fixes
* **docs:** add missing parsers to properties list ([3faadac](https://github.com/EmergingTechnologyAdvisors/node-serialport/commit/3faadac))
### Features
* **open:** Throw on incorrect baudrate option ([#1347](https://github.com/EmergingTechnologyAdvisors/node-serialport/issues/1347)) ([a3b8d35](https://github.com/EmergingTechnologyAdvisors/node-serialport/commit/a3b8d35))
* **parsers:** Add cctalk parsers ([#1342](https://github.com/EmergingTechnologyAdvisors/node-serialport/issues/1342)) ([bcb492f](https://github.com/EmergingTechnologyAdvisors/node-serialport/commit/bcb492f))
<a name="6.0.0-beta2"></a>

@@ -2,0 +18,0 @@ # [6.0.0-beta2](https://github.com/EmergingTechnologyAdvisors/node-serialport/compare/v6.0.0-beta1...v6.0.0-beta2) (2017-09-07)

15

lib/parsers/index.js

@@ -12,2 +12,5 @@ 'use strict';

* @property {Class} [Readline] is a transform stream that emits data after a newline delimiter is received.
* @property {Class} [Ready] is a transform stream that waits for a sequence of "ready" bytes before emitting a ready event and emitting data events
* @property {Class} [Regex] is a transform stream that uses a regular expression to split the incoming text upon.
* @since 5.0.0

@@ -55,3 +58,3 @@ * @example

To use the `Ready` parser provide a byte start sequence. After the bytes have been received data events are passed through.
To use the `Ready` parser provide a byte start sequence. After the bytes have been received a ready event is fired and data events are passed through.
```js

@@ -74,2 +77,11 @@ const SerialPort = require('serialport');

```
To use the `CCTalk` parser you need to provide nothing. CCTalk Messages get emitted as buffer.
```js
const SerialPort = require('serialport');
const CCTalk = SerialPort.parsers.CCTalk;
const port = new SerialPort('/dev/ttyUSB0');
const parser = port.pipe(new CCtalk());
parser.on('data', console.log);
```
*/

@@ -79,2 +91,3 @@

ByteLength: require('./byte-length'),
CCTalk: require('./cctalk'),
Delimiter: require('./delimiter'),

@@ -81,0 +94,0 @@ Readline: require('./readline'),

@@ -126,2 +126,6 @@ 'use strict';

if (settings.baudrate) {
throw new TypeError(`"baudrate" is an unknown option, did you mean "baudRate"?`);
}
if (typeof settings.baudRate !== 'number') {

@@ -128,0 +132,0 @@ throw new TypeError(`"baudRate" must be a number: ${settings.baudRate}`);

8

package.json
{
"name": "serialport",
"version": "6.0.0-beta2",
"version": "6.0.0-beta3",
"description": "Node.js package to access serial ports. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!",

@@ -74,3 +74,3 @@ "author": {

"conventional-changelog-cli": "^1.3.2",
"eslint": "^4.5.0",
"eslint": "^4.7.2",
"eslint-config-standard": "^10.2.1",

@@ -83,6 +83,6 @@ "eslint-plugin-import": "^2.7.0",

"jsdoc-to-markdown": "^3.0.0",
"mocha": "^3.4.2",
"mocha": "^4.0.0",
"prebuild": "^6.2.1",
"proxyquire": "^1.7.10",
"sinon": "^3.2.1"
"sinon": "^4.0.0"
},

@@ -89,0 +89,0 @@ "engines": {

@@ -44,3 +44,3 @@ # Node Serialport

- [`serialport@6.0.0-beta2` docs](https://github.com/EmergingTechnologyAdvisors/node-serialport/blob/6.0.0-beta1/README.md) the latest `6.x` release.
- [`serialport@6.0.0-beta3` docs](https://github.com/EmergingTechnologyAdvisors/node-serialport/blob/6.0.0-beta3/README.md) the latest `6.x` release.
- [`serialport@4.0.7` docs](https://github.com/EmergingTechnologyAdvisors/node-serialport/blob/4.0.7/README.md) the latest `4.x` release.

@@ -729,2 +729,4 @@

| Readline | <code>Class</code> | is a transform stream that emits data after a newline delimiter is received. |
| Ready | <code>Class</code> | is a transform stream that waits for a sequence of "ready" bytes before emitting a ready event and emitting data events |
| Regex | <code>Class</code> | is a transform stream that uses a regular expression to split the incoming text upon. |

@@ -772,3 +774,3 @@ **Example**

To use the `Ready` parser provide a byte start sequence. After the bytes have been received data events are passed through.
To use the `Ready` parser provide a byte start sequence. After the bytes have been received a ready event is fired and data events are passed through.
```js

@@ -792,2 +794,11 @@ const SerialPort = require('serialport');

To use the `CCTalk` parser you need to provide nothing. CCTalk Messages get emitted as buffer.
```js
const SerialPort = require('serialport');
const CCTalk = SerialPort.parsers.CCTalk;
const port = new SerialPort('/dev/ttyUSB0');
const parser = port.pipe(new CCtalk());
parser.on('data', console.log);
```
* * *

@@ -794,0 +805,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc