index.js
/**
 * CLI Search Action
 * Starts a search with all of the search action flags from the CLI
 * @param {Array} query - array of query strings
 * @param {Object} options - options object that contains references to option flags
 */
CLI Search Action
Starts a search with all of the search action flags from the CLI
@param {Array} query - array of query strings
@param {Object} options - options object that contains references to option flags
CLI Search Action Starts a search with all of the search action flags from the CLI @param { Array } query - array of query strings @param { Object } options - options object that contains references to option flags
function cli_Search(query, options) {
    cli_Parse();
    if ((!query || query.length < 1) && (!options.file || options.file.length < 1)) {
        program.help();
        return;
    }
    if (options.file) {
        search_Array = fs.readFileSync(options.file).toString().split("\n");
    } else {
        search_Array = query;
    }
    if (search_Array.length < 1) {
        program.help();
        return;
    }
    if (options.limit) {
        search_Limit = options.limit;
    }
    newSearch();
}
function cli_Search ( query , options ) { cli_Parse ( ) ; if ( ( ! query || query . length < 1 ) && ( ! options . file || options . file . length < 1 ) ) { program . help ( ) ; return ; } if ( options . file ) { search_Array = fs . readFileSync ( options . file ) . toString ( ) . split ( "\n" ) ; } else { search_Array = query ; } if ( search_Array . length < 1 ) { program . help ( ) ; return ; } if ( options . limit ) { search_Limit = options . limit ; } newSearch ( ) ; }
CLI Search Action
 Starts a search with all of the search action flags from the CLI
 @param {Array} query - array of query strings
 @param {Object} options - options object that contains references to option flags
CLI Search Action Starts a search with all of the search action flags from the CLI @param { Array } query - array of query strings @param { Object } options - options object that contains references to option flags
// Run CLI Parse // Check if search has the required options // * Require at least one search query if search argument is provided // * Require a search query file if no query is provided // Check what items to search for (either by file input or CLI) // Double check the search items array has at least one item // Check the number of items to limit to // Run a new search