docs: Fix doc param description error (#2106)

* fix space

* Make doc consistent with the code for `blinding`

* Update packages/stream/lib/index.js

Co-authored-by: Francis Gulotta <wizard@roborooter.com>

Co-authored-by: Francis Gulotta <wizard@roborooter.com>
This commit is contained in:
JumpT 2020-07-17 10:57:52 +08:00 • committed by GitHub
parent 45f83ab666
commit 38595d0763
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,7 @@ function allocNewReadPool(poolSize) {
* @property {boolean} [xoff=false] flow control setting
* @property {boolean} [xany=false] flow control setting
* @property {object=} bindingOptions sets binding-specific options
* @property {Binding=} Binding The hardware access binding. `Bindings` are how Node-Serialport talks to the underlying system. By default we auto detect Windows (`WindowsBinding`), Linux (`LinuxBinding`) and OS X (`DarwinBinding`) and load the appropriate module for your system.
* @property {Binding=} binding The hardware access binding. `Bindings` are how Node-Serialport talks to the underlying system. By default we auto detect Windows (`WindowsBinding`), Linux (`LinuxBinding`) and OS X (`DarwinBinding`) and load the appropriate module for your system.
* @property {number} [bindingOptions.vmin=1] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
* @property {number} [bindingOptions.vtime=0] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
*/
@ -293,7 +293,7 @@ From the [stream docs](https://nodejs.org/api/stream.html#stream_writable_write_
In addition to the usual `stream.write` arguments (`String` and `Buffer`), `write()` can accept arrays of bytes (positive numbers under 256) which is passed to `Buffer.from([])` for conversion. This extra functionality is pretty sweet.
* @method SerialPort.prototype.write
* @param {(string|array|buffer)} data Accepts a [`Buffer` ](http://nodejs.org/api/buffer.html) object, or a type that is accepted by the `Buffer` constructor (e.g. an array of bytes or a string).
* @param {(string|array|buffer)} data Accepts a [`Buffer`](http://nodejs.org/api/buffer.html) object, or a type that is accepted by the `Buffer` constructor (e.g. an array of bytes or a string).
* @param {string=} encoding The encoding, if chunk is a string. Defaults to `'utf8'`. Also accepts `'ascii'`, `'base64'`, `'binary'`, and `'hex'` See [Buffers and Character Encodings](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) for all available options.
* @param {function=} callback Called once the write operation finishes. Data may not yet be flushed to the underlying port. No arguments.
* @returns {boolean} `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.