array.md

October 8, 2016 ยท View on GitHub

Array readers and writers

import * as ez from 'ez-streams'

  • reader = ez.devices.array.reader(array, options)
    creates an EZ reader that reads its entries from array.
    reader.read(_) will return its entries asynchronously by default.
    You can force synchronous delivery by setting options.sync to true.
  • 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 setting options.sync to true. writer.toArray() returns the internal array into which the entries have been collected.