Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "hs/array/findIndex/index"

Index

Functions

Functions

findIndex

  • Works similarly to Array.findIndex (es6). It takes hyper-array and a function that called with each item. It returns a hyper-value that equals to the id of the first element in the array that satisfies the provided testing function. If no item is found returned hyper-value equals to -1.

    Type parameters

    • T

    Parameters

    • hs: HyperScope

      HyperScope instance

    • hv: HyperValue<T[]>

      hyper-array to search in

    • fn: IteratorFn<T, boolean>

      search function

    Returns HyperValue<number | null>

    new hyper-value equals to found id

Generated using TypeDoc