Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

node.js event emitter that adds streams as input / output sources.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 package.json
Octocat-spinner-32 readme.md
readme.md

StreamedEmitter

A streamed emitter is an emitter that can send events over streams. It is simple and lightweight using JSON arrays delimited by newlines. The interface to a streamed emitter mimics the EventEmitter interface with 2 new methods.

This emitter can be used as the base to more complex libraries such as dnode or hook.io (those 2 are not built upon this however).

addInput(inputstream)

Adds a stream that will be listened to for incoming JSON arrays. These incoming arrays will be emitted on the StreamedEmitter. If an error occurs during parsing a line it will be emitted on the StreamedEmitter.

addOutput(outputstream)

Adds a stream to the list of streams to emit events to as JSON arrays. When any emit(...) occurs on the StreamedEmitter it will be sent to all outputs. For every error occuring during writes to output streams a new error will be emitted on the StreamedEmitter.

Something went wrong with that request. Please try again.