• It will return all but the last element of the value.

    Type Parameters

    • Value extends string | unknown[]

    Parameters

    Returns HeadT<Value>

    Since

    1.0.0

    Example

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

    Example

    head("012345");
    // => "01234"