ixfx
    Preparing search index...

    Function addObjectEntriesMutate

    • Adds an object to an existing map, mutating it. It assumes a structure where each top-level property is a key:

      const data = {
      Sally: { colour: `red` },
      Bob: { colour: `pink` }
      };
      const map = new Map();
      addObjectEntriesMutate(map, data);

      map.get(`Sally`); // { name: `Sally`, colour: `red` }

      To create a new map from an object, use fromObject instead.

      Type Parameters

      • V

      Parameters

      • map: Map<string, V>
      • data: object

      Returns void