• Map an object to a new object. Filters out null values

    Type Parameters

    • TItem
    • TOut

    Parameters

    • obj: Record<string, TItem>
    • mapVal: ((val: TItem, key: string) => undefined | TOut)
        • (val, key): undefined | TOut
        • Parameters

          Returns undefined | TOut

    • mapKey: ((val: TItem, key: string) => undefined | string)
        • (val, key): undefined | string
        • Parameters

          Returns undefined | string

    Returns Record<string, NonNullable<TOut>>

  • Map an object to a new object. Filters out null values

    Type Parameters

    • TItem
    • TOut

    Parameters

    • obj: Record<string, TItem>
    • mapVal: ((val: TItem, key: string) => undefined | TOut)
        • (val, key): undefined | TOut
        • Parameters

          Returns undefined | TOut

    Returns Record<string, NonNullable<TOut>>