Module
Choku
- Package
- purescript-choku
- Repository
- m15a/purescript-choku
This module imports and re-exports some default submodules for convenience, namely
Choku.Common
Choku.Color
Choku.Style
Choku.Stdout
The last one, Choku.Stdout
, might not be for your use case,
as it works in Eff
and customized for the STDOUT stream.
To use chalk in Aff
, import Choku.Stdout.Aff
or Choku.Stderr.Aff
instead.
To use chalk for the STDERR stream, import Choku.Stderr
or Choku.Stderr.Aff
instead.
Re-exports from Choku.Color
Re-exports from Choku.Common
#level Source
level :: Choku -> Int
Return the color support level of the given chalk.
Higher level means more colors are supported. For detail, see https://github.com/chalk/chalk#chalklevel.
Re-exports from Choku.Stdout
#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.
#supportsColor Source
Re-exports from Choku.Style
#whiteBright Source
whiteBright :: Style
#greenBright Source
greenBright :: Style
#cyanBright Source
cyanBright :: Style
#blueBright Source
blueBright :: Style
#blackBright Source
blackBright :: Style
#bgRedBright Source
bgRedBright :: Style
RGB digits. Each channel has the 8-bit range
0
to255
.