1 | import "core-js/modules/es.string.search.js";
|
2 | import "core-js/modules/es.regexp.exec.js";
|
3 | import global from 'global';
|
4 | import { parse } from 'qs';
|
5 | var document = global.document;
|
6 | export var getQueryParams = function getQueryParams() {
|
7 |
|
8 | if (document && document.location && document.location.search) {
|
9 | return parse(document.location.search, {
|
10 | ignoreQueryPrefix: true
|
11 | });
|
12 | }
|
13 |
|
14 | return {};
|
15 | };
|
16 | export var getQueryParam = function getQueryParam(key) {
|
17 | var params = getQueryParams();
|
18 | return params[key];
|
19 | }; |
\ | No newline at end of file |