Options
All
  • Public
  • Public/Protected
  • All
Menu

Module sortedIndexOf

Index

References

Functions Array

References

Renames and re-exports __type

Array Functions

  • sortedIndexOf<T>(array: T[], value: T): number
  • This method is like indexOf except that it performs a binary search on a sorted array.

    since

    5.11.0

    example
    sortedIndexOf([4, 5, 5, 5, 6], 5)
    // => 1

    Type parameters

    • T

    Parameters

    • array: T[]

      The array to inspect.

    • value: T

      The value to search for.

    Returns number

    Returns the index of the matched value, else -1.