src/utils/UpdateNotification.js
function _stripOldVersionInfo(versionInfo, buildNumber) {
        // Do a simple linear search. Since we are going in reverse-chronological order, we
        // should get through the search quickly.
        var lastIndex = 0;
        var len = versionInfo.length;
        var versionEntry;
        var validBuildEntries;

        while (lastIndex < len) {
            versionEntry = versionInfo[lastIndex];
            if (versionEntry.buildNumber <= buildNumber) {
                break;
            }
            lastIndex++;
        }

        if (lastIndex > 0) {
            // Filter recent update entries based on applicability to current platform
            validBuildEntries = versionInfo.slice(0, lastIndex).filter(_checkBuildApplicability);
        }

        return validBuildEntries;
    }
function _stripOldVersionInfo(versionInfo, buildNumber) {
        // Do a simple linear search. Since we are going in reverse-chronological order, we
        // should get through the search quickly.
        var lastIndex = 0;
        var len = versionInfo.length;
        var versionEntry;
        var validBuildEntries;

        while (lastIndex < len) {
            versionEntry = versionInfo[lastIndex];
            if (versionEntry.buildNumber <= buildNumber) {
                break;
            }
            lastIndex++;
        }

        if (lastIndex > 0) {
            // Filter recent update entries based on applicability to current platform
            validBuildEntries = versionInfo.slice(0, lastIndex).filter(_checkBuildApplicability);
        }

        return validBuildEntries;
    }
function _stripOldVersionInfo ( versionInfo , buildNumber ) { // Do a simple linear search. Since we are going in reverse-chronological order, we // should get through the search quickly. var lastIndex = 0 ; var len = versionInfo . length ; var versionEntry ; var validBuildEntries ; while ( lastIndex < len ) { versionEntry = versionInfo [ lastIndex ] ; if ( versionEntry . buildNumber <= buildNumber ) { break ; } lastIndex ++ ; } if ( lastIndex > 0 ) { // Filter recent update entries based on applicability to current platform validBuildEntries = versionInfo . slice ( 0 , lastIndex ) . filter ( _checkBuildApplicability ) ; } return validBuildEntries ; }
Return a new array of version information that is newer than "buildNumber".
Returns null if there is no new version information.
Return a new array of version information that is newer than buildNumber . Returns null if there is no new version information .