encode.js
/**
 * Encode the given object to URI Component encoded query string
 *
 * @param {Object.<string, *>} object The object to encode
 * @param {boolean} [keepArrayIndex] Whether to keep array index
 * @returns {string} Returns the URI Component encoded query string
 */
Encode the given object to URI Component encoded query string
@param {Object.} object The object to encode
@param {boolean} [keepArrayIndex] Whether to keep array index
@returns {string} Returns the URI Component encoded query string
Encode the given object to URI Component encoded query string @param { Object . } object The object to encode @param { boolean } [ keepArrayIndex ] Whether to keep array index @returns { string } Returns the URI Component encoded query string
function encode(object, keepArrayIndex) {
    var key;
    var keyValueArray = [];
    keepArrayIndex = !!keepArrayIndex;
    if ( isObject(object) ) {
        for ( key in object ) {
            if ( hasOwn.call(object, key) ) {
                encodeKey(key, object[key], keyValueArray, keepArrayIndex);
            }
        }
    }
    return keyValueArray.join('&');
}
function encode ( object , keepArrayIndex ) { var key ; var keyValueArray = [ ] ; keepArrayIndex = ! ! keepArrayIndex ; if ( isObject ( object ) ) { for ( key in object ) { if ( hasOwn . call ( object , key ) ) { encodeKey ( key , object [ key ] , keyValueArray , keepArrayIndex ) ; } } } return keyValueArray . join ( '&' ) ; }
Encode the given object to URI Component encoded query string
 @param {Object.<string, *>} object The object to encode
 @param {boolean} [keepArrayIndex] Whether to keep array index
 @returns {string} Returns the URI Component encoded query string
Encode the given object to URI Component encoded query string @param { Object . <string * > } object The object to encode @param { boolean } [ keepArrayIndex ] Whether to keep array index @returns { string } Returns the URI Component encoded query string