Returns an AsyncGenerator that allows reading a set number of bytes from the passed source.
AsyncGenerator
import { reader } from 'it-reader'const stream = reader(source)// read 10 bytes from the streamconst { done, value } = await stream.next(10)if (done === true) { // stream finished}if (value != null) { // do something with value}
Returns an
AsyncGenerator
that allows reading a set number of bytes from the passed source.Example