docs/vendor.js
function scanForView(containerNode, startIdx, viewBlockId) {
    var views = containerNode.data[VIEWS];
    for (var i = startIdx; i < views.length; i++) {
        var viewAtPositionId = views[i].data[TVIEW].id;
        if (viewAtPositionId === viewBlockId) {
            return views[i];
        }
        else if (viewAtPositionId < viewBlockId) {
            // found a view that should not be at this position - remove
            removeView(containerNode, i);
        }
        else {
            // found a view with id greater than the one we are searching for
            // which means that required view doesn't exist and can't be found at
            // later positions in the views array - stop the search here
            break;
        }
    }
    return null;
}
function scanForView(containerNode, startIdx, viewBlockId) {
    var views = containerNode.data[VIEWS];
    for (var i = startIdx; i < views.length; i++) {
        var viewAtPositionId = views[i].data[TVIEW].id;
        if (viewAtPositionId === viewBlockId) {
            return views[i];
        }
        else if (viewAtPositionId < viewBlockId) {
            // found a view that should not be at this position - remove
            removeView(containerNode, i);
        }
        else {
            // found a view with id greater than the one we are searching for
            // which means that required view doesn't exist and can't be found at
            // later positions in the views array - stop the search here
            break;
        }
    }
    return null;
}
function scanForView ( containerNode , startIdx , viewBlockId ) { var views = containerNode . data [ VIEWS ] ; for ( var i = startIdx ; i < views . length ; i ++ ) { var viewAtPositionId = views [ i ] . data [ TVIEW ] . id ; if ( viewAtPositionId === viewBlockId ) { return views [ i ] ; } else if ( viewAtPositionId < viewBlockId ) { // found a view that should not be at this position - remove removeView ( containerNode , i ) ; } else { // found a view with id greater than the one we are searching for // which means that required view doesn't exist and can't be found at // later positions in the views array - stop the search here break ; } } return null ; }
Looks for a view with a given view block id inside a provided LContainer.
Removes views that need to be deleted in the process.

@param containerNode where to search for views
@param startIdx starting index in the views array to search from
@param viewBlockId exact view block id to look for
@returns index of a found view or -1 if not found
Looks for a view with a given view block id inside a provided LContainer . Removes views that need to be deleted in the process .