Node.Process
- Package
- purescript-node-process
- Repository
- purescript-node/purescript-node-process
Bindings to the global process
object in Node.js. See also the Node API documentation
#onBeforeExit Source
onBeforeExit :: forall eff. Eff (process :: PROCESS | eff) Unit -> Eff (process :: PROCESS | eff) Unit
Register a callback to be performed when the event loop empties, and Node.js is about to exit. Asynchronous calls can be made in the callback, and if any are made, it will cause the process to continue a little longer.
#onExit Source
onExit :: forall eff. (Int -> Eff (process :: PROCESS | eff) Unit) -> Eff (process :: PROCESS | eff) Unit
Register a callback to be performed when the process is about to exit. Any work scheduled via asynchronous calls made here will not be performed in time.
The argument to the callback is the exit code which the process is about to exit with.
#stdoutIsTTY Source
stdoutIsTTY :: Boolean
Check whether the standard output stream appears to be attached to a TTY. It is a good idea to check this before printing ANSI codes to stdout (e.g. for coloured text in the terminal).
#stderrIsTTY Source
stderrIsTTY :: Boolean
Check whether the standard error stream appears to be attached to a TTY. It is a good idea to check this before printing ANSI codes to stderr (e.g. for coloured text in the terminal).
- Modules
- Node.
Globals - Node.
Platform - Node.
Process