mirror of
https://github.com/codedread/bitjs
synced 2025-10-05 10:29:24 +02:00
Make skip() return the ByteStream, for chaining. Document the tee() method.
This commit is contained in:
parent
b72e629d8a
commit
208b69a65d
3 changed files with 29 additions and 5 deletions
|
@ -297,6 +297,7 @@ export class ByteStream {
|
|||
/**
|
||||
* Skips n bytes in the stream.
|
||||
* @param {number} n The number of bytes to skip. Must be a positive integer.
|
||||
* @returns {ByteStream} Returns this ByteStream for chaining.
|
||||
*/
|
||||
skip(n) {
|
||||
const num = parseInt(n, 10);
|
||||
|
@ -313,6 +314,7 @@ export class ByteStream {
|
|||
}
|
||||
|
||||
this.movePointer_(n);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue