lib/collection/query-param.js
function (obj, encode) {
        if (!obj) { return EMPTY; }

        var key = obj.key,
            value = obj.value;

        if (value === undefined) {
            return EMPTY;
        }

        if (key === null) {
            key = EMPTY;
        }

        if (value === null) {
            return encode ? urlEncoder.encode(key) : key;
        }

        if (encode) {
            key = urlEncoder.encode(key);
            value = urlEncoder.encode(value);
        }

        return key + EQUALS + value;
    }
function (obj, encode) {
        if (!obj) { return EMPTY; }

        var key = obj.key,
            value = obj.value;

        if (value === undefined) {
            return EMPTY;
        }

        if (key === null) {
            key = EMPTY;
        }

        if (value === null) {
            return encode ? urlEncoder.encode(key) : key;
        }

        if (encode) {
            key = urlEncoder.encode(key);
            value = urlEncoder.encode(value);
        }

        return key + EQUALS + value;
    }
function ( obj , encode ) { if ( ! obj ) { return EMPTY ; } var key = obj . key , value = obj . value ; if ( value === undefined ) { return EMPTY ; } if ( key === null ) { key = EMPTY ; } if ( value === null ) { return encode ? urlEncoder . encode ( key ) : key ; } if ( encode ) { key = urlEncoder . encode ( key ) ; value = urlEncoder . encode ( value ) ; } return key + EQUALS + value ; }
Takes a query param and converts to string

@param {Object} obj
@param {Boolean} encode
@returns {String}

@deprecated since v3.4.6, drop support for `encode`
Takes a query param and converts to string