lib/requester/core.js
function (arr) {
        if (!_.isArray(arr)) {
            return;
        }

        var obj = {},
            key,
            val,
            i,
            ii;

        for (i = 0, ii = arr.length; i < ii; i += 2) {
            key = arr[i];
            val = arr[i + 1];

            if (_.has(obj, key)) {
                !_.isArray(obj[key]) && (obj[key] = [obj[key]]);
                obj[key].push(val);
            }
            else {
                obj[key] = val;
            }
        }

        return obj;
    }
function (arr) {
        if (!_.isArray(arr)) {
            return;
        }

        var obj = {},
            key,
            val,
            i,
            ii;

        for (i = 0, ii = arr.length; i < ii; i += 2) {
            key = arr[i];
            val = arr[i + 1];

            if (_.has(obj, key)) {
                !_.isArray(obj[key]) && (obj[key] = [obj[key]]);
                obj[key].push(val);
            }
            else {
                obj[key] = val;
            }
        }

        return obj;
    }
function ( arr ) { if ( ! _ . isArray ( arr ) ) { return ; } var obj = { } , key , val , i , ii ; for ( i = 0 , ii = arr . length ; i < ii ; i += 2 ) { key = arr [ i ] ; val = arr [ i + 1 ] ; if ( _ . has ( obj , key ) ) { ! _ . isArray ( obj [ key ] ) && ( obj [ key ] = [ obj [ key ] ] ) ; obj [ key ] . push ( val ) ; } else { obj [ key ] = val ; } } return obj ; }
Converts an array of sequential pairs to an object.

@param arr
@returns {{}}

@example
['a', 'b', 'c', 'd'] ====> {a: 'b', c: 'd' }
Converts an array of sequential pairs to an object .