Skip to content
This repository has been archived by the owner on Dec 21, 2017. It is now read-only.
/ SuperStream Public archive

The Voltron of node style streams. No real use here just playing with streams

Notifications You must be signed in to change notification settings

euforic/SuperStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperStream

The Voltron of node style streams

Build Status NPM version

Work in progress

Features

  • Stream mixin support
  • Read, Write and Transform support
  • Stream any data type

Stream( )

Create new stream instance

// new Stream(); can also be used
var stream = Stream();

Stream( object )

Create stream mixin from existing object. Conflicting properties will be overwritten with Stream property.

var obj = {};
Stream(obj);

stream.write( data, callback )

// TODO add docs

stream._write( data, callback ) NOT-IMPLEMENTED-YET

// TODO add docs

stream.push( data )

// TODO add docs

stream._read( size ) NOT-IMPLEMENTED-YET

// TODO add docs

stream.unshift( data ) NOT-IMPLEMENTED-YET

// TODO add docs

stream._transform( data, callback )

// TODO add docs

stream._flush( callback ) NOT-IMPLEMENTED-YET

// TODO add docs

stream.pipe( destination, [options] )

// TODO add docs

stream.unpipe( Stream ) NOT-IMPLEMENTED-YET

// TODO add docs

stream.pause()

stream.pause();

stream.resume()

stream.resume();

stream.end( data, callback ) NOT-IMPLEMENTED-YET

// TODO add docs

Events

readable NOT-IMPLEMENTED-YET

When there is data ready to be consumed, this event will fire. When this event emits, call the read() method to consume the data.

data

Emitted on data being written to the Stream. Note that adding a 'data' event listener will switch the Readable stream into "old mode", where data is emitted as soon as it is available, rather than waiting for you to call read() to consume it

error

Emitted if there was an error receiving data.

end NOT-IMPLEMENTED-YET

Emitted when the stream has received an EOF (FIN in TCP terminology). Indicates that no more 'data' events will happen.

drain NOT-IMPLEMENTED-YET

Emitted when the stream's write queue empties and it's safe to write without buffering again. Listen for it when stream.write() returns false.

finish NOT-IMPLEMENTED-YET

When end() is called and there are no more chunks to write, this event is emitted.

pipe NOT-IMPLEMENTED-YET

Emitted when the stream is passed to a readable stream's pipe method.

unpipe NOT-IMPLEMENTED-YET

Emitted when a previously established pipe() is removed using the source Readable stream's unpipe() method.

License

MIT

About

The Voltron of node style streams. No real use here just playing with streams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published