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 :: Effect Unit -> Effect UnitRegister 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.
#onUncaughtException Source
onUncaughtException :: (Error -> Effect Unit) -> Effect UnitInstall a handler for uncaught exceptions. The callback will be called
when the process emits the uncaughtException event. The handler
currently does not expose the second origin argument from the Node 12
version of this event to maintain compatibility with older Node versions.
#onUnhandledRejection Source
onUnhandledRejection :: forall a b. (a -> b -> Effect Unit) -> Effect UnitInstall a handler for unhandled promise rejections. The callback will be
called when the process emits the unhandledRejection event.
The first argument to the handler can be whatever type the unhandled
Promise yielded on rejection (typically, but not necessarily, an Error).
The handler currently does not expose the type of the second argument,
which is a Promise, in order to allow users of this library to choose
their own PureScript Promise bindings.
#stdinIsTTY Source
stdinIsTTY :: BooleanCheck whether the standard input stream appears to be attached to a TTY. It is a good idea to check this before processing the input data from stdin.
#stdoutIsTTY Source
stdoutIsTTY :: BooleanCheck 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 :: BooleanCheck 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.
Platform - Node.
Process