| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 78ca15d commit 54879ab
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -981,7 +981,7 @@ setTimeout(() => { | |||
| 981 | 981 | added: v0.9.11 | |
| 982 | 982 | --> | |
| 983 | 983 | ||
| 984 | - * `chunk` {Buffer|string} Chunk of data to unshift onto the read queue | ||
| 984 | + * `chunk` {Buffer|string|any} Chunk of data to unshift onto the read queue | ||
| 985 | 985 | ||
| 986 | 986 | The `readable.unshift()` method pushes a chunk of data back into the internal | |
| 987 | 987 | buffer. This is useful in certain situations where a stream is being consumed by | |
@@ -1295,8 +1295,9 @@ const myWritable = new Writable({ | |||
| 1295 | 1295 | ||
| 1296 | 1296 | #### writable.\_write(chunk, encoding, callback) | |
| 1297 | 1297 | ||
| 1298 | - * `chunk` {Buffer|string} The chunk to be written. Will **always** | ||
| 1299 | - be a buffer unless the `decodeStrings` option was set to `false`. | ||
| 1298 | + * `chunk` {Buffer|string|any} The chunk to be written. Will **always** | ||
| 1299 | + be a buffer unless the `decodeStrings` option was set to `false` | ||
| 1300 | + or the stream is operating in object mode. | ||
| 1300 | 1301 | * `encoding` {string} If the chunk is a string, then `encoding` is the | |
| 1301 | 1302 | character encoding of that string. If chunk is a `Buffer`, or if the | |
| 1302 | 1303 | stream is operating in object mode, `encoding` may be ignored. | |
@@ -1500,13 +1501,13 @@ user programs. | |||
| 1500 | 1501 | ||
| 1501 | 1502 | #### readable.push(chunk[, encoding]) | |
| 1502 | 1503 | ||
| 1503 | - * `chunk` {Buffer|null|string} Chunk of data to push into the read queue | ||
| 1504 | + * `chunk` {Buffer|null|string|any} Chunk of data to push into the read queue | ||
| 1504 | 1505 | * `encoding` {string} Encoding of String chunks. Must be a valid | |
| 1505 | 1506 | Buffer encoding, such as `'utf8'` or `'ascii'` | |
| 1506 | 1507 | * Returns {boolean} `true` if additional chunks of data may continued to be | |
| 1507 | 1508 | pushed; `false` otherwise. | |
| 1508 | 1509 | ||
| 1509 | - When `chunk` is a `Buffer` or `string`, the `chunk` of data will be added to the | ||
| 1510 | + When `chunk` is not `null`, the `chunk` of data will be added to the | ||
| 1510 | 1511 | internal queue for users of the stream to consume. Passing `chunk` as `null` | |
| 1511 | 1512 | signals the end of the stream (EOF), after which no more data can be written. | |
| 1512 | 1513 | ||
@@ -1873,8 +1874,9 @@ user programs. | |||
| 1873 | 1874 | ||
| 1874 | 1875 | #### transform.\_transform(chunk, encoding, callback) | |
| 1875 | 1876 | ||
| 1876 | - * `chunk` {Buffer|string} The chunk to be transformed. Will **always** | ||
| 1877 | - be a buffer unless the `decodeStrings` option was set to `false`. | ||
| 1877 | + * `chunk` {Buffer|string|any} The chunk to be transformed. Will **always** | ||
| 1878 | + be a buffer unless the `decodeStrings` option was set to `false` | ||
| 1879 | + or the stream is operating in object mode. | ||
| 1878 | 1880 | * `encoding` {string} If the chunk is a string, then this is the | |
| 1879 | 1881 | encoding type. If chunk is a buffer, then this is the special | |
| 1880 | 1882 | value - 'buffer', ignore it in this case. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments