doc: minor structural stream/iter edits · nodejs/node@859a02d · GitHub
Skip to content

Commit 859a02d

Browse files
Renegade334aduh95
authored andcommitted
doc: minor structural stream/iter edits
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk> PR-URL: #63089 Backport-PR-URL: #64675 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 630b15e commit 859a02d

4 files changed

Lines changed: 265 additions & 268 deletions

File tree

doc/api/index.md

Lines changed: 1 addition & 2 deletions

doc/api/stream_iter.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ if (writer.endSync() < 0) await writer.end();
416416
writer.fail(err); // Always synchronous, no fallback needed
417417
```
418418

419-
### `writer.desiredSize`
419+
#### `writer.desiredSize`
420420

421421
* {number|null}
422422

@@ -425,7 +425,7 @@ Returns `null` if the writer is closed or the consumer has disconnected.
425425

426426
The value is always non-negative.
427427

428-
### `writer.end([options])`
428+
#### `writer.end([options])`
429429

430430
* `options` {Object}
431431
* `signal` {AbortSignal} Cancel just this operation. The signal cancels only
@@ -434,7 +434,7 @@ The value is always non-negative.
434434

435435
Signal that no more data will be written.
436436

437-
### `writer.endSync()`
437+
#### `writer.endSync()`
438438

439439
* Returns: {number} Total bytes written, or `-1` if the writer is not open.
440440

@@ -448,7 +448,7 @@ if (result < 0) {
448448
}
449449
```
450450

451-
### `writer.fail(reason)`
451+
#### `writer.fail(reason)`
452452

453453
* `reason` {any}
454454

@@ -457,7 +457,7 @@ or errored, this is a no-op. Unlike `write()` and `end()`, `fail()` is
457457
unconditionally synchronous because failing a writer is a pure state
458458
transition with no async work to perform.
459459

460-
### `writer.write(chunk[, options])`
460+
#### `writer.write(chunk[, options])`
461461

462462
* `chunk` {Uint8Array|string}
463463
* `options` {Object}
@@ -467,15 +467,15 @@ transition with no async work to perform.
467467

468468
Write a chunk. The promise resolves when buffer space is available.
469469

470-
### `writer.writeSync(chunk)`
470+
#### `writer.writeSync(chunk)`
471471

472472
* `chunk` {Uint8Array|string}
473473
* Returns: {boolean} `true` if the write was accepted, `false` if the
474474
buffer is full.
475475

476476
Synchronous write. Does not block; returns `false` if backpressure is active.
477477

478-
### `writer.writev(chunks[, options])`
478+
#### `writer.writev(chunks[, options])`
479479

480480
* `chunks` {Uint8Array\[]|string\[]}
481481
* `options` {Object}
@@ -485,7 +485,7 @@ Synchronous write. Does not block; returns `false` if backpressure is active.
485485

486486
Write multiple chunks as a single batch.
487487

488-
### `writer.writevSync(chunks)`
488+
#### `writer.writevSync(chunks)`
489489

490490
* `chunks` {Uint8Array\[]|string\[]}
491491
* Returns: {boolean} `true` if the write was accepted, `false` if the
@@ -1422,7 +1422,7 @@ added: REPLACEME
14221422

14231423
Compression and decompression transforms for use with `pull()`, `pullSync()`,
14241424
`pipeTo()`, and `pipeToSync()` are available via the [`node:zlib/iter`][]
1425-
module. See the [`node:zlib/iter` documentation][] for details.
1425+
module. See the [`node:zlib/iter` documentation][`node:zlib/iter`] for details.
14261426

14271427
## Classic stream interop
14281428

@@ -2069,8 +2069,7 @@ console.log(textSync(stream)); // 'hello world'
20692069
[`bytes()`]: #bytessource-options
20702070
[`from()`]: #frominput
20712071
[`fromSync()`]: #fromsyncinput
2072-
[`node:zlib/iter`]: zlib_iter.md
2073-
[`node:zlib/iter` documentation]: zlib_iter.md
2072+
[`node:zlib/iter`]: zlib.md#iterable-compression
20742073
[`pipeTo()`]: #pipetosource-transforms-writer-options
20752074
[`pull()`]: #pullsource-transforms-options
20762075
[`pullSync()`]: #pullsyncsource-transforms-options

doc/api/zlib.md

Lines changed: 254 additions & 1 deletion

0 commit comments

Comments
 (0)