You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 12, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -178,13 +178,9 @@ Creates a new readable stream in object mode that outputs objects of the form
178
178
}
179
179
```
180
180
181
-
#### `begin` and `end`
181
+
#### `offset` and `length`
182
182
183
-
`begin` and `end` arguments can optionally be passed to the reader function. These follow the same semantics as the JavaScript [`Array.slice(begin, end)`][] method.
184
-
185
-
That is: `begin` is the index in the stream to start sending data, `end` is the index *before* which to stop sending data.
186
-
187
-
A negative `begin` starts the slice from the end of the stream and a negative `end` ends the slice by subtracting `end` from the total stream length.
183
+
`offset` and `length` arguments can optionally be passed to the reader function. These will cause the returned stream to only emit bytes starting at `offset` and with length of `length`.
188
184
189
185
See [the tests](test/reader.js) for examples of using these arguments.
0 commit comments