lib/twitreq.js
function genQueryString (options) {

    if ( !options.queryParams ) {
        return "";
    }

    log(options.verbose,"Now generating query string value ...");

    var queryStringParams = [];

    Object.keys(options.queryParams).forEach(function (key) {
        queryStringParams.push(createEncodedParam(key,options.queryParams[key]));
    });

    var queryString = "?";

    log(options.verbose,"Query string key/value pairs are:");

    for ( var i=0; i<queryStringParams.length; i++ ) {
        log(options.verbose,"  "+queryStringParams[i].key+"="+queryStringParams[i].value);
        queryString += queryStringParams[i].key+"="+queryStringParams[i].value;
        if ( queryStringParams[i+1] ) {
            queryString += "&";
        }
    }

    log(options.verbose,"Query string value is: "+queryString);

    return queryString;
}
function genQueryString (options) {

    if ( !options.queryParams ) {
        return "";
    }

    log(options.verbose,"Now generating query string value ...");

    var queryStringParams = [];

    Object.keys(options.queryParams).forEach(function (key) {
        queryStringParams.push(createEncodedParam(key,options.queryParams[key]));
    });

    var queryString = "?";

    log(options.verbose,"Query string key/value pairs are:");

    for ( var i=0; i<queryStringParams.length; i++ ) {
        log(options.verbose,"  "+queryStringParams[i].key+"="+queryStringParams[i].value);
        queryString += queryStringParams[i].key+"="+queryStringParams[i].value;
        if ( queryStringParams[i+1] ) {
            queryString += "&";
        }
    }

    log(options.verbose,"Query string value is: "+queryString);

    return queryString;
}
function genQueryString ( options ) { if ( ! options . queryParams ) { return "" ; } log ( options . verbose , "Now generating query string value ..." ) ; var queryStringParams = [ ] ; Object . keys ( options . queryParams ) . forEach ( function ( key ) { queryStringParams . push ( createEncodedParam ( key , options . queryParams [ key ] ) ) ; } ) ; var queryString = "?" ; log ( options . verbose , "Query string key/value pairs are:" ) ; for ( var i = 0 ; i < queryStringParams . length ; i ++ ) { log ( options . verbose , "  " + queryStringParams [ i ] . key + "=" + queryStringParams [ i ] . value ) ; queryString += queryStringParams [ i ] . key + "=" + queryStringParams [ i ] . value ; if ( queryStringParams [ i + 1 ] ) { queryString += "&" ; } } log ( options . verbose , "Query string value is: " + queryString ) ; return queryString ; }
Generate a percent encoded query string from the supplied options.
Generate a percent encoded query string from the supplied options .