code: function generateObjectId(obj) {
  
          if (!angular.isUndefined(obj.$$repeatImmutableKey)) {
              return obj.$$repeatImmutableKey;
          }
  
          const id = `$$repeatImmutable:object:${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;
  
          Object.defineProperty(obj, '$$repeatImmutableKey', {
              value: id
          });
  
          return id;
      }
docs: Generates a key which consists of "$$repeatImmutable:object:" followed by
  a GUID and attaches that id to the object as a non-writable,
  non-enumerable property named "$$repeatImmutableKey"
  @param {Object|Array} obj - the object to identify
  @returns {string} the id generated for the object