This PR includes a new a constructor for EventParser which is a stream.Transform. Since all of the RESTClient "verb" methods (get(), put(), post(), and delete()) return a stream.Readable, this constructor can be used to pipe calls to /events through and use EventEmitter style handling.
This PR includes a new a constructor for
EventParser
which is astream.Transform
. Since all of theRESTClient
"verb" methods (get()
,put()
,post()
, anddelete()
) return astream.Readable
, this constructor can be used to pipe calls to/events
through and useEventEmitter
style handling.This should effecctively close #55
See the included example and tests for more details. Also addresses Pieter's requested doc updates.
@pnagurny or @martindale - either of you have time today to review, test, and merge? Package version has been bumped and ready to publish to NPM.