• Gets the element at index n of array. If n is negative, the nth element from the end is returned.

    Differences from lodash:

    • does not handle a fractional value for index

    Contribution to minified bundle size, when it is the only function imported:

    • Lodash: 1,923 bytes
    • Micro-dash: 94 bytes

    Type Parameters

    • T

    Parameters

    • array: readonly T[]
    • index: number

    Returns T

  • Type Parameters

    • T

    Parameters

    • array: Nil | readonly T[]
    • index: number

    Returns T | undefined