@nevware21/ts-utils
    Preparing search index...

    Function polyArrFlatMap

    • Polyfill implementation of Array.flatMap() for environments that don't support it.

      Type Parameters

      • T

        Identifies the base type of array elements

      • R = T

        Identifies the flattened output element type

      Parameters

      • theArray: ArrayLike<T>

        The array or array-like object to map and flatten.

      • callbackFn: ArrFlatMapCallbackFn<T, R>

        A function that is called for each existing element and may return either a single value or an array of values to flatten into the result.

      • OptionalthisArg: any

        A value to use as this when executing callbackFn. Defaults to undefined if not provided.

      Returns R[]

      A new array containing the mapped and flattened values.

      0.14.0

      TypeError if theArray is null or undefined, or if callbackFn is not a function.