strtok3 10.3.0 → 10.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -361,15 +361,7 @@ import { ReadableWebToNodeStream } from 'readable-web-to-node-stream';
|
|
|
361
361
|
|
|
362
362
|
## Dependencies
|
|
363
363
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
```mermaid
|
|
367
|
-
graph TD;
|
|
368
|
-
S(strtok3)-->P(peek-readable)
|
|
369
|
-
S(strtok3)-->TO("@tokenizer/token")
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
- [peek-readable](https://github.com/Borewit/peek-readable): Manages reading operations with peeking capabilities, allowing data to be previewed without advancing the read pointer.
|
|
364
|
+
Dependencies:
|
|
373
365
|
- [@tokenizer/token](https://github.com/Borewit/tokenizer-token): Provides token definitions and utilities used by `strtok3` for interpreting binary data.
|
|
374
366
|
|
|
375
367
|
## Licence
|
|
@@ -22,7 +22,7 @@ export class AbstractStreamReader {
|
|
|
22
22
|
if (!this.endOfStream) {
|
|
23
23
|
bytesRead += await this.readRemainderFromStream(buffer.subarray(bytesRead), mayBeLess);
|
|
24
24
|
}
|
|
25
|
-
if (bytesRead === 0) {
|
|
25
|
+
if (bytesRead === 0 && !mayBeLess) {
|
|
26
26
|
throw new EndOfStreamError();
|
|
27
27
|
}
|
|
28
28
|
return bytesRead;
|
|
@@ -46,7 +46,7 @@ export class WebStreamDefaultReader extends AbstractStreamReader {
|
|
|
46
46
|
totalBytesRead += this.writeChunk(buffer.subarray(totalBytesRead), result.value);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
if (totalBytesRead === 0 && this.endOfStream) {
|
|
49
|
+
if (!mayBeLess && totalBytesRead === 0 && this.endOfStream) {
|
|
50
50
|
throw new EndOfStreamError();
|
|
51
51
|
}
|
|
52
52
|
return totalBytesRead;
|