index.js
function formatParameters(params)
{
    var sortedKeys = [],
        formattedParams = ''

    // sort the properties of the parameters
    sortedKeys = _.keys(params).sort()

    // create a string of key value pairs separated by '&' with '=' assignement
    for (i = 0; i < sortedKeys.length; i++)
    {
        if (i !== 0) {
            formattedParams += '&'
        }
        formattedParams += sortedKeys[i] + '=' + params[sortedKeys[i]]
    }

    return formattedParams
}
function formatParameters(params)
{
    var sortedKeys = [],
        formattedParams = ''

    // sort the properties of the parameters
    sortedKeys = _.keys(params).sort()

    // create a string of key value pairs separated by '&' with '=' assignement
    for (i = 0; i < sortedKeys.length; i++)
    {
        if (i !== 0) {
            formattedParams += '&'
        }
        formattedParams += sortedKeys[i] + '=' + params[sortedKeys[i]]
    }

    return formattedParams
}
function formatParameters ( params ) { var sortedKeys = [ ] , formattedParams = '' // sort the properties of the parameters sortedKeys = _ . keys ( params ) . sort ( ) // create a string of key value pairs separated by '&' with '=' assignement for ( i = 0 ; i < sortedKeys . length ; i ++ ) { if ( i !== 0 ) { formattedParams += '&' } formattedParams += sortedKeys [ i ] + '=' + params [ sortedKeys [ i ] ] } return formattedParams }
This method returns the parameters as key=value pairs separated by & sorted by the key
@param  {Object}  params   The object to encode
@return {String}           formatted parameters
This method returns the parameters as key = value pairs separated by & sorted by the key