@hat-open/util
    Preparing search index...

    Function _map

    • Change array or object by appling function to it's elements

      For each element, provided function is called with element value, index/key and original container.

      Type Parameters

      • T1
      • T2

      Parameters

      • fn: (val: T1, index?: number, arr?: T1[]) => T2
      • arr: T1[]

      Returns T2[]

    • Change array or object by appling function to it's elements

      For each element, provided function is called with element value, index/key and original container.

      Type Parameters

      • T1
      • T2

      Parameters

      • fn: (val: T1, key?: string, obj?: Record<string, T1>) => T2
      • obj: Record<string, T1>

      Returns Record<string, T2>