{"size": 577, "ext": "js", "max_stars_repo_path": "resources/js/core/helpers/app/AppFunction.js", "max_stars_repo_name": "MohsinAliJaved/payday", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "resources/js/core/helpers/app/AppFunction.js", "max_issues_repo_name": "MohsinAliJaved/payday", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "resources/js/core/helpers/app/AppFunction.js", "max_forks_repo_name": "MohsinAliJaved/payday", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.08, "max_line_length": 82, "alphanum_fraction": 0.6065857886}
export default class AppFunction{

    static getBaseUrl() {
        const app_url = window.localStorage.getItem('base_url');
        return app_url || window.location.origin;
    }

    static getAppUrl(path) {
        return `${this.getBaseUrl()}/${path.split('/').filter(d => d).join('/')}`;
    }

    static getQueryStringValue(key){
        const urlParams = new URLSearchParams(window.location.search);
        return urlParams.get(key);
    }

    static backToPrevioustUrl(){
        history.back();
    }

    static goToNextUrl(){
        history.forward();
    }
}
