src/back/models/Entity.js
function _visitSpecializations(entities, visitedEntities) {
  for (var entityName in entities) {
    if (!visitedEntities.hasOwnProperty(entityName)) {
      visitedEntities[entityName] = entities[entityName];

      _visitSpecializations(
        entities[entityName].directSpecializations,
        visitedEntities
      );
    }
  }
}
function _visitSpecializations(entities, visitedEntities) {
  for (var entityName in entities) {
    if (!visitedEntities.hasOwnProperty(entityName)) {
      visitedEntities[entityName] = entities[entityName];

      _visitSpecializations(
        entities[entityName].directSpecializations,
        visitedEntities
      );
    }
  }
}
function _visitSpecializations ( entities , visitedEntities ) { for ( var entityName in entities ) { if ( ! visitedEntities . hasOwnProperty ( entityName ) ) { visitedEntities [ entityName ] = entities [ entityName ] ; _visitSpecializations ( entities [ entityName ] . directSpecializations , visitedEntities ) ; } } }
Visits all specializations of a list of entities.
@name module:back4app-entity/models.Entity~_visitSpecializations
@function
@param entities The entities whose specializations shall be visited.
@param visitedEntities The list of visited entities.
@private
@example
var specializations = [];
_visitSpecializations(MyEntity.directSpecializations, specializations);
console.log(specializations); // Logs all specializations of MyEntity
Visits all specializations of a list of entities .