ixfx
    Preparing search index...

    Function mapOfSimpleMutable

    • A simple mutable map of arrays, without events. It can store multiple values under the same key.

      For a fancier approaches, consider ofArrayMutable, ofCircularMutable or ofSetMutable.

      Type Parameters

      • V

        Type of items

      Parameters

      • groupBy: (value: V) => string = defaultKeyer
      • valueEq: IsEqual<V> = ...

      Returns IMapOfMutable<V>

      New instance

      const m = mapOfSimpleMutable();
      m.add(`hello`, 1, 2, 3); // Adds numbers under key `hello`
      m.delete(`hello`); // Deletes everything under `hello`

      const hellos = m.get(`hello`); // Get list of items under `hello`