Module
Node.Stream
- Package
- purescript-node-streams
- Repository
- purescript-node/purescript-node-streams
This module provides a low-level wrapper for the Node Stream API.
#setEncoding Source
setEncoding :: forall w. Readable w -> Encoding -> Effect Unit
Set the encoding used to read chunks as strings from the stream. This function may be useful when you are passing a readable stream to some other JavaScript library, which already expects an encoding to be set.
Where possible, you should try to use onDataString
instead of this
function.
#setDefaultEncoding Source
setDefaultEncoding :: forall r. Writable r -> Encoding -> Effect Unit
Set the default encoding used to write strings to the stream. This function
is useful when you are passing a writable stream to some other JavaScript
library, which already expects a default encoding to be set. It has no
effect on the behaviour of the writeString
function (because that
function ensures that the encoding is always supplied explicitly).
- Modules
- Node.
Stream