Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 514 Bytes

generic.md

File metadata and controls

13 lines (10 loc) · 514 Bytes

Generic stream constructors

import * as ez from 'ez-streams'

  • reader = ez.devices.generic.reader(read[, stop])
    creates an EZ reader from a given read(_) function and an optional stop(_, [arg]) function.
  • writer = ez.devices.generic.writer(write)
    creates an ES writer from a given write(_, val) function.

Special streams

  • ez.devices.generic.empty
    The empty stream. empty.read(_) returns undefined. It is also a null sink. It just discards anything you would write to it.