Function sortedIndex

  • Uses a binary search to determine the lowest index at which value should be inserted into array in order to maintain its sort order.

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

    • Lodash: 1,472 bytes
    • Micro-dash: 274 bytes

    Type Parameters

    • T

    Parameters

    • array: Nil | readonly T[]
    • value: T

    Returns number