Module

Node.Stream.Aff.Internal

Package
purescript-node-streams-aff
Repository
purescript-deprecated/purescript-node-streams-aff

Maybe the stuff in here should be moved into the Node.Stream module?

#onceDrain Source

onceDrain :: forall w. Writable w -> Effect Unit -> Effect (Effect Unit)

Listen for one drain event, call the callback, then remove the event listener.

Returns an effect for removing the event listener before the event is raised.

#onceEnd Source

onceEnd :: forall r. Readable r -> Effect Unit -> Effect (Effect Unit)

Listen for one end event, call the callback, then remove the event listener.

Returns an effect for removing the event listener before the event is raised.

#onceClose Source

onceClose :: forall s. Stream s -> Effect Unit -> Effect (Effect Unit)

Listen for one close event, call the callback, then remove the event listener.

Returns an effect for removing the event listener before the event is raised.

#onceError Source

onceError :: forall r. Stream r -> (Error -> Effect Unit) -> Effect (Effect Unit)

Listen for one error event, call the callback, then remove the event listener.

Returns an effect for removing the event listener before the event is raised.

#onceReadable Source

onceReadable :: forall r. Readable r -> Effect Unit -> Effect (Effect Unit)

Listen for one readable event, call the callback, then remove the event listener.

Returns an effect for removing the event listener before the event is raised.

#readable Source

readable :: forall r. Readable r -> Effect Boolean

The readable.readable property of a stream.

Is true if it is safe to call readable.read(), which means the stream has not been destroyed or emitted 'error' or 'end'.

#writable Source

writable :: forall w. Writable w -> Effect Boolean

#newReadable Source

newReadable :: forall r. Effect (Readable r)

new stream.Readable()

#newReadableStringUTF8 Source

newReadableStringUTF8 :: forall r m. MonadEffect m => String -> m (Readable r)

Construct a UTF-8 Readable from a String.

#newStreamPassThrough Source

newStreamPassThrough :: forall m. MonadEffect m => m Duplex

“A trivial implementation of a Transform stream that simply passes the input bytes across to the output.”

Class: stream.PassThrough