ixfx
    Preparing search index...

    Function mutable

    • Returns a IMapMutable (which just wraps the in-built Map) Use Maps.immutable for the immutable alternative.

      Type Parameters

      • K
      • V

      Parameters

      • ...data: EitherKey<K, V>

        Optional initial data in the form of an array of { key: value } or [ key, value ]

      Returns IMapMutable<K, V>

      const m = mapMutable();
      // Add one or more entries
      m.add(["name", "sally"]);
      // Alternatively:
      m.set("name", "sally");
      // Recall
      m.get("name"); // "sally"
      m.delete("name");
      m.isEmpty; // True
      m.clear();