tasks/lib/removeloggingcalls.js
function(segments) {
        var previousSegment = [-1, -1];
        var segmentIndicesToRemove = [];
        var cleanedSegmentArray = [];
        var i, ii;
        for (i = 0, ii = segments.length; i < ii; ++i) {
            if (!(previousSegment[0] <= segments[i][0] &&
                    previousSegment[1] >= segments[i][1])) {
                cleanedSegmentArray.push(segments[i]);
            }
            previousSegment = segments[i];
        }

        segments.length = 0;
        for (i = 0, ii = cleanedSegmentArray.length; i < ii; ++i) {
            segments.push(cleanedSegmentArray[i]);
        }
    }
function(segments) {
        var previousSegment = [-1, -1];
        var segmentIndicesToRemove = [];
        var cleanedSegmentArray = [];
        var i, ii;
        for (i = 0, ii = segments.length; i < ii; ++i) {
            if (!(previousSegment[0] <= segments[i][0] &&
                    previousSegment[1] >= segments[i][1])) {
                cleanedSegmentArray.push(segments[i]);
            }
            previousSegment = segments[i];
        }

        segments.length = 0;
        for (i = 0, ii = cleanedSegmentArray.length; i < ii; ++i) {
            segments.push(cleanedSegmentArray[i]);
        }
    }
function ( segments ) { var previousSegment = [ - 1 , - 1 ] ; var segmentIndicesToRemove = [ ] ; var cleanedSegmentArray = [ ] ; var i , ii ; for ( i = 0 , ii = segments . length ; i < ii ; ++ i ) { if ( ! ( previousSegment [ 0 ] <= segments [ i ] [ 0 ] && previousSegment [ 1 ] >= segments [ i ] [ 1 ] ) ) { cleanedSegmentArray . push ( segments [ i ] ) ; } previousSegment = segments [ i ] ; } segments . length = 0 ; for ( i = 0 , ii = cleanedSegmentArray . length ; i < ii ; ++ i ) { segments . push ( cleanedSegmentArray [ i ] ) ; } }
Remove segments that are nested in other
@param {Node[]} node the console calls nodes
Remove segments that are nested in other