@wopjs/tsur - v0.1.7
    Preparing search index...

    Function firstMap

    • Applies function to the elements of iterator and returns the first non-none result.

      firstMap(fn) is the lighter version of filterMap(fn).first().

      Type Parameters

      • T
      • U

      Parameters

      • arr: T[]

        An array

      • fn: (value: T, index: number, array: T[]) => Option<U>

        A function that produces an Option.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<U>

      The first non-none result.