lib/Models/CatalogGroup.js
function deIndexWithDescendants(items, index) {
  items.forEach(function(item) {
    item.allShareKeys.forEach(function(key) {
      index[key] = undefined;
    }, this);

    if (defined(item.items)) {
      deIndexWithDescendants(item.items, index);
    }
  });
}
function deIndexWithDescendants(items, index) {
  items.forEach(function(item) {
    item.allShareKeys.forEach(function(key) {
      index[key] = undefined;
    }, this);

    if (defined(item.items)) {
      deIndexWithDescendants(item.items, index);
    }
  });
}
function deIndexWithDescendants ( items , index ) { items . forEach ( function ( item ) { item . allShareKeys . forEach ( function ( key ) { index [ key ] = undefined ; } , this ) ; if ( defined ( item . items ) ) { deIndexWithDescendants ( item . items , index ) ; } } ) ; }
Removes all passed items to the passed index, and all the children of those items recursively.

@param {CatalogMember[]} items
@param {Object} index
Removes all passed items to the passed index and all the children of those items recursively .