Gaunt Sloth Assistant - v1.0.5
0.9 (legacy docs)
GitHub
Preparing search index...
utils/consoleUtils
coerceBooleanOrString
Function coerceBooleanOrString
coerceBooleanOrString
(
value
:
unknown
)
:
string
|
boolean
|
undefined
Convenience wrapper that returns a union directly instead of the tagged result.
Returns:
boolean when the input is a boolean-like token
string when the input is non-empty and not a boolean-like token
undefined when the input is nullish or empty/whitespace
Parameters
value
:
unknown
Returns
string
|
boolean
|
undefined
Settings
Member Visibility
Protected
Inherited
External
Alpha
Beta
Theme
OS
Light
Dark
0.9 (legacy docs)
GitHub
Gaunt Sloth Assistant - v1.0.5
Loading...
Convenience wrapper that returns a union directly instead of the tagged result.
Returns: