• Creates a Set with all keys of a Map.

    Example

    const map = new Map([
    ["k1", "v1"],
    ["k2", "v2"]
    ]);

    const keys = keySet(map);
    console.log(keys); // Set(["k1", "k2"])

    Returns

    the Set containing all Map keys

    Type Parameters

    • K

      the Map key type

    • V

      the Map value type

    Parameters

    • map: Map<K, V>

      the Map to obtain the keys from

    Returns Set<K>

Generated using TypeDoc