Gaunt Sloth Assistant
GitHub
Preparing search index...
utils/consoleUtils
coerceBooleanOrString
Function coerceBooleanOrString
coerceBooleanOrString
(
value
:
unknown
)
:
undefined
|
string
|
boolean
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
undefined
|
string
|
boolean
Settings
Member Visibility
Protected
Inherited
External
Alpha
Beta
Theme
OS
Light
Dark
GitHub
Gaunt Sloth Assistant
Loading...
Convenience wrapper that returns a union directly instead of the tagged result.
Returns: