Skip to content

Commit 3faadac

Browse files
committed
fix(docs): add missing parsers to properties list
1 parent ad8abf6 commit 3faadac

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ The default `Parsers` are [Transform streams](https://nodejs.org/api/stream.html
725725
| ByteLength | <code>Class</code> | is a transform stream that emits data as a buffer after a specific number of bytes are received. |
726726
| Delimiter | <code>Class</code> | is a transform stream that emits data each time a byte sequence is received. |
727727
| Readline | <code>Class</code> | is a transform stream that emits data after a newline delimiter is received. |
728+
| 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 |
729+
| Regex | <code>Class</code> | is a transform stream that uses a regular expression to split the incoming text upon. |
728730

729731
**Example**
730732
```js
@@ -767,7 +769,7 @@ const parser = port.pipe(new Readline({ delimiter: '\r\n' }));
767769
parser.on('data', console.log);
768770
```
769771

770-
To use the `Ready` parser provide a byte start sequence. After the bytes have been received data events are passed through.
772+
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.
771773
```js
772774
const SerialPort = require('serialport');
773775
const Ready = SerialPort.parsers.Ready;

lib/parsers/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
* @property {Class} [ByteLength] is a transform stream that emits data as a buffer after a specific number of bytes are received.
1010
* @property {Class} [Delimiter] is a transform stream that emits data each time a byte sequence is received.
1111
* @property {Class} [Readline] is a transform stream that emits data after a newline delimiter is received.
12+
* @property {Class} [Ready] is a transform stream that waits for a sequence of "ready" bytes before emitting a ready event and emitting data events
13+
* @property {Class} [Regex] is a transform stream that uses a regular expression to split the incoming text upon.
14+
1215
* @since 5.0.0
1316
* @example
1417
```js
@@ -51,7 +54,7 @@ const parser = port.pipe(new Readline({ delimiter: '\r\n' }));
5154
parser.on('data', console.log);
5255
```
5356
54-
To use the `Ready` parser provide a byte start sequence. After the bytes have been received data events are passed through.
57+
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.
5558
```js
5659
const SerialPort = require('serialport');
5760
const Ready = SerialPort.parsers.Ready;

0 commit comments

Comments
 (0)