Gaunt Sloth Assistant
    Preparing search index...

    Function coerceBooleanOrString

    • 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