function search(searchArg) {
    var results = [];
    results.push(readCsvLineSync('Date,OU,FY,Reporting Cycle,HQ ID,Legacy ID,IM,Agency,Legacy Partner Name,Legacy Partner ID,Start Date,End Date,Active,Award Number,Partner DUNS,Partner Country,Indigenous Partner,Organization Type,Legacy Partner Organization Type ID,OU Country Code,Partner Name')); // Header line.
    if (searchArg) {
        refreshFileCache();
        var lineCount = 0;
        var reg = new RegExp(searchArg, 'i'); // Case-insensitive regular expression.
        for (var i = fileCache.length-1; i >= 0; i--) {
            var cache = fileCache[i];
            for (var j = 0; j < cache.lines.length; j++) {
                if ( reg.test(cache.lines[j]) ) {
                    results.push(readCsvLineSync(cache.date + ',' + cache.lines[j]));
                    if (++lineCount == 90) {
                        return results; // Limit output to 90 lines.
                    }
                }
            }
        }
    }
    return results;
}
/**
 * Searches through the archived FACTS Info import .csv files in reverse
 * chronoligical order for a regular expression (case insensitive).
 *
 * @param {string} arg the regular expression
 * @returns {string} .csv-format string with search results
 */
Searches through the archived FACTS Info import .csv files in reverse
chronoligical order for a regular expression (case insensitive).

@param {string} arg the regular expression
@returns {string} .csv-format string with search results
Searches through the archived FACTS Info import . csv files in reverse chronoligical order for a regular expression ( case insensitive ) . @param { string } arg the regular expression @returns { string } . csv - format string with search results
function search(searchArg) {
    var results = [];
    results.push(readCsvLineSync('Date,OU,FY,Reporting Cycle,HQ ID,Legacy ID,IM,Agency,Legacy Partner Name,Legacy Partner ID,Start Date,End Date,Active,Award Number,Partner DUNS,Partner Country,Indigenous Partner,Organization Type,Legacy Partner Organization Type ID,OU Country Code,Partner Name')); 
    if (searchArg) {
        refreshFileCache();
        var lineCount = 0;
        var reg = new RegExp(searchArg, 'i'); 
        for (var i = fileCache.length-1; i >= 0; i--) {
            var cache = fileCache[i];
            for (var j = 0; j < cache.lines.length; j++) {
                if ( reg.test(cache.lines[j]) ) {
                    results.push(readCsvLineSync(cache.date + ',' + cache.lines[j]));
                    if (++lineCount == 90) {
                        return results; 
                    }
                }
            }
        }
    }
    return results;
}
function search ( searchArg ) { var results = [ ] ; results . push ( readCsvLineSync ( 'Date,OU,FY,Reporting Cycle,HQ ID,Legacy ID,IM,Agency,Legacy Partner Name,Legacy Partner ID,Start Date,End Date,Active,Award Number,Partner DUNS,Partner Country,Indigenous Partner,Organization Type,Legacy Partner Organization Type ID,OU Country Code,Partner Name' ) ) ; if ( searchArg ) { refreshFileCache ( ) ; var lineCount = 0 ; var reg = new RegExp ( searchArg , 'i' ) ; for ( var i = fileCache . length - 1 ; i >= 0 ; i -- ) { var cache = fileCache [ i ] ; for ( var j = 0 ; j < cache . lines . length ; j ++ ) { if ( reg . test ( cache . lines [ j ] ) ) { results . push ( readCsvLineSync ( cache . date + ',' + cache . lines [ j ] ) ) ; if ( ++ lineCount == 90 ) { return results ; } } } } } return results ; }
Searches through the archived FACTS Info import .csv files in reverse
 chronoligical order for a regular expression (case insensitive).
Searches through the archived FACTS Info import . csv files in reverse chronoligical order for a regular expression ( case insensitive ) .
// Header line. // Case-insensitive regular expression. // Limit output to 90 lines.