Function first

  • It will return the first element of the value.

    Type Parameters

    • Value extends string | unknown[]

    Parameters

    Returns FirstT<Value>

    Since

    1.0.0

    Example

    first([0, 1, 2, 3, 4, 5]);
    // => 0

    Example

    first("012345");
    // => "0"