src/windshaft/map-serializer/anonymous-map-serializer/analysis-serializer.js
function _generateUniqueAnalysisList (analysisList) {
  var analysisIds = {};
  return _.reduce(analysisList, function (list, analysis) {
    if (!analysisIds[analysis.get('id')] && !_isAnalysisPartOfOtherAnalyses(analysis, analysisList)) {
      analysisIds[analysis.get('id')] = true; // keep a set of already added analysis.
      list.push(analysis.toJSON());
    }
    return list;
  }, []);
}
function _generateUniqueAnalysisList (analysisList) {
  var analysisIds = {};
  return _.reduce(analysisList, function (list, analysis) {
    if (!analysisIds[analysis.get('id')] && !_isAnalysisPartOfOtherAnalyses(analysis, analysisList)) {
      analysisIds[analysis.get('id')] = true; // keep a set of already added analysis.
      list.push(analysis.toJSON());
    }
    return list;
  }, []);
}
function _generateUniqueAnalysisList ( analysisList ) { var analysisIds = { } ; return _ . reduce ( analysisList , function ( list , analysis ) { if ( ! analysisIds [ analysis . get ( 'id' ) ] && ! _isAnalysisPartOfOtherAnalyses ( analysis , analysisList ) ) { analysisIds [ analysis . get ( 'id' ) ] = true ; // keep a set of already added analysis. list . push ( analysis . toJSON ( ) ) ; } return list ; } , [ ] ) ; }
Return an analysis list without duplicated or nested analyses
Return an analysis list without duplicated or nested analyses