To add a new stream type to test, create a file here that exports a
function or class that can be called with s = new Class(options)
, where
options
can include {encoding: 'utf8'}
or {objectMode: true}
.
The returned object must implement at minimum the following subset of the stream interface:
on(event, fn)
callfn
whenevent
happenswrite(data)
wheredata
will be an object, string, or buffer. Returntrue
if more data should be written,false
otherwise. Emitdrain
when ready for more data iffalse
is written.end()
no further data will be written, emit'finish'
when all data processedpipe(dest)
pipe all output todest
stream