Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "hs/array/find/index"

Index

Functions

Functions

find

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

    Type parameters

    • T

    Parameters

    • hs: HyperScope

      HyperScope instance

    • hv: HyperValue<T[]>

      hyper-array to search in

    • fn: IteratorFn<T, boolean>

      search function

    Returns HyperValue<T | null>

    new hyper-value equals to found item

Generated using TypeDoc