All files / src utility.js

50% Statements 4/8
50% Branches 1/2
0% Functions 0/1
50% Lines 4/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15      5x 5x 5x             5x    
 
export default {
    getQueryParams() {
        const obj = {};
        let url = window.location.href;
        Iif (url.indexOf('?') >= 0) {
            url = url.split('?')[1]; // eslint-disable-line prefer-destructuring
            url = url.split('&');
            Object.values(url).forEach((elem) => {
                obj[elem.split('=')[0]] = elem.split('=')[1]; // eslint-disable-line prefer-destructuring
            });
        }
        return obj;
    }
};