• Converts a string to uppercase.

    Example

    uppercase("hello world")
    // => { ok: true, value: 'HELLO WORLD' }

    Example

    Handling non-string input:

    uppercase(42)
    // => { ok: false, error: Error('[strings.uppercase] Expected string value as input') }

    Parameters

    • str: string

      The string to convert to uppercase.

    Returns Result<string, Error>

    A Result object with either the converted string on success, or an Error object if the provided input is not a string.

Generated using TypeDoc v0.24.7