dist/lib/api.js
function getQueryString(data) {
    if (!data || typeof data !== 'object' || !Object.keys(data).length)
        return '';
    return '?' + Object.keys(data).map((k) => {
        const value = (typeof data[k] === 'object')
            ? JSON.stringify(data[k])
            : encodeURIComponent(data[k]);
        return `${encodeURIComponent(k)}=${value}`;
    }).join('&');
}
function getQueryString(data) {
    if (!data || typeof data !== 'object' || !Object.keys(data).length)
        return '';
    return '?' + Object.keys(data).map((k) => {
        const value = (typeof data[k] === 'object')
            ? JSON.stringify(data[k])
            : encodeURIComponent(data[k]);
        return `${encodeURIComponent(k)}=${value}`;
    }).join('&');
}
function getQueryString ( data ) { if ( ! data || typeof data !== 'object' || ! Object . keys ( data ) . length ) return '' ; return '?' + Object . keys ( data ) . map ( ( k ) => { const value = ( typeof data [ k ] === 'object' ) ? JSON . stringify ( data [ k ] ) : encodeURIComponent ( data [ k ] ) ; return ` ${ encodeURIComponent ( k ) } ${ value } ` ; } ) . join ( '&' ) ; }
Convert payload data to query string for GET requests
Convert payload data to query string for GET requests