Module
Choku.Stdout
- Package
- purescript-choku
- Repository
- m15a/purescript-choku
Chalk in Effect
, for the STDOUT stream.
The default chalk instance automatically detects the level of color support
in the environment, either STDOUT or STDERR.
This module provides the default chalk instance for the STDOUT stream.
For the STDERR stream, use the module Choku.Stderr
.
NOTE: You can force the color support level via environment variable
$FORCE_COLOR
.
See also
#supportsColor Source
#withStyle Source
withStyle :: String -> Style -> Effect String
Modify a string, using the default chalk for STDOUT, with the given style.
For example,
import Prelude
import Effect.Console
import Data.Maybe
import Partial.Unsafe
import Choku
log =<< "hello" `withStyle` (inverse >>> underline)
prints an inversed and underlined "hello"
string.