function resolveSubclasses(objectModelsWithoutResolvedSubclasses) {
  const om = objectModelsWithoutResolvedSubclasses;
  return _.map(om, (model) => {
    const subclasses = _.filter(_.map(om, (subModel) => {
      if (subModel.superclass !== model.name) { return undefined; }
      return _.pick(subModel, ['specName', 'name']);
    }));
    return { ...model, subclasses };
  });
}
//   and put some information about those subclasses on the superclass model.
and put some information about those subclasses on the superclass model.
and put some information about those subclasses on the superclass model .
function resolveSubclasses(objectModelsWithoutResolvedSubclasses) {
  const om = objectModelsWithoutResolvedSubclasses;
  return _.map(om, (model) => {
    const subclasses = _.filter(_.map(om, (subModel) => {
      if (subModel.superclass !== model.name) { return undefined; }
      return _.pick(subModel, ['specName', 'name']);
    }));
    return { ...model, subclasses };
  });
}
function resolveSubclasses ( objectModelsWithoutResolvedSubclasses ) { const om = objectModelsWithoutResolvedSubclasses ; return _ . map ( om , ( model ) => { const subclasses = _ . filter ( _ . map ( om , ( subModel ) => { if ( subModel . superclass !== model . name ) { return undefined ; } return _ . pick ( subModel , [ 'specName' , 'name' ] ) ; } ) ) ; return { ... model , subclasses } ; } ) ; }
and put some information about those subclasses on the superclass model.
and put some information about those subclasses on the superclass model .