Function isString

  • Validate a string

    Parameters

    • input: unknown

      The raw input

    Returns Validated<string>

    Example

    isString("") >>
    {
    valid: true,
    parsed: "",
    };

    isString(1) >>
    {
    valid: false,
    error: "Not a string: 1",
    };