mapRemove (Function)

Signature: mapRemove(map: Map<string, t0>, key: string) -> Map<string, t0>

Description: Returns a new map without key. No-op if key is absent.

Parameters

  • map (Map<string, t0>): The map
  • key (string): Key

Returns: Map<string, t0>

Example

mapRemove({"a": 1, "b": 2}, "a")  // {"b": 2}
mapRemove (["a" => 1, "b" => 2], "a")  // {"b": 2}