lib/util.js
function addMultipartData (formData, data) {
    var key, arr, i;

    for (key in data) {
        if (data.hasOwnProperty(key) && key !== 'files') {
            if (data[key] instanceof Array) {
                arr = data[key];

                for (i = 0; i < arr.length; i += 1) {
                    formData.append(key + '[' + i + ']', exports.stringifyIfObject(arr[i]));
                }
            } else {
                formData.append(key, exports.stringifyIfObject(data[key]));
            }
        }
    }
}
function addMultipartData (formData, data) {
    var key, arr, i;

    for (key in data) {
        if (data.hasOwnProperty(key) && key !== 'files') {
            if (data[key] instanceof Array) {
                arr = data[key];

                for (i = 0; i < arr.length; i += 1) {
                    formData.append(key + '[' + i + ']', exports.stringifyIfObject(arr[i]));
                }
            } else {
                formData.append(key, exports.stringifyIfObject(data[key]));
            }
        }
    }
}
function addMultipartData ( formData , data ) { var key , arr , i ; for ( key in data ) { if ( data . hasOwnProperty ( key ) && key !== 'files' ) { if ( data [ key ] instanceof Array ) { arr = data [ key ] ; for ( i = 0 ; i < arr . length ; i += 1 ) { formData . append ( key + '[' + i + ']' , exports . stringifyIfObject ( arr [ i ] ) ) ; } } else { formData . append ( key , exports . stringifyIfObject ( data [ key ] ) ) ; } } } }
Helper used by `formRequestPayload` to append data to FormData instance
Helper used by formRequestPayload to append data to FormData instance