@promistream/observe
v0.1.0
Published
Proper documentation to come soon.
Readme
@promistream/observe
Proper documentation to come soon.
This stream was designed for use in automated tests only. You should not use it in production code.
Handlers
onPeek(): triggered when a peek is requested, before a result is producedonPeekResult(result): triggered when a peek has completed, regardless of whether it istrueorfalseonReadError(error): triggered when a peek failed due to an unexpected error being thrown (this is always a bug)onRead(): triggered when a read is requested, before a result is producedonReadValue(value): triggered when a read has completed, if the result is a successful valueonReadError(error): triggered when a read has completed, if the result is an error (but not an Aborted/EndOfStream marker)onEndOfStream(): triggered when an EndOfStream marker has been receivedonAborted(): triggered when an Aborted marker has been receivedonAbort(): triggered when the abort method on the stream is called, do not confuse withonAborted, this one fires on the way up (ie. before cleanup), not on the way down
