import * as ez from 'ez-streams'
reader = ez.devices.array.reader(array, options)
creates an EZ reader that reads its entries fromarray
.
reader.read(_)
will return its entries asynchronously by default.
You can force synchronous delivery by settingoptions.sync
totrue
.writer = ez.devices.array.writer(options)
creates an EZ writer that collects its entries into an array.
writer.write(_, value)
will write asynchronously by default.
You can force synchronous write by settingoptions.sync
totrue
.writer.toArray()
returns the internal array into which the entries have been collected.