• Maps the values of a Map from type S to T

    Example

    Map all values from number to string

    const mapper = mapValues((n) => String(n));
    const map = mapValues(new Map([1, 1]));
    console.log(map); // Map([[1, "1"]])

    Returns

    the new Map with the mapped values

    Type Parameters

    • S

    • T

    Parameters

    Returns (<K>(map: Map<K, S>) => Map<K, T>)

      • <K>(map: Map<K, S>): Map<K, T>
      • Type Parameters

        • K

        Parameters

        • map: Map<K, S>

        Returns Map<K, T>

Generated using TypeDoc