Function isString

  • Check if input is a string

    Type Parameters

    • T extends string

    Parameters

    • input: unknown

      Value to check

    • Optional check: RegExp | "url" | "non-empty"

      Optional check: RegExp, url (URL.canParse), non-empty (at least one non-whitespace character)

    Returns input is T

    true if the input passed, false otherwise