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.

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`
  • Type Parameters

    • V

      Type of items

    Parameters

    • groupBy: ((value: V) => string) = defaultKeyer
        • (value): string
        • Parameters

          • value: V

          Returns string

    • valueEq: IsEqual<V> = ...

    Returns IMapOfMutable<V>

    New instance