diff options
author | Anike Arni <anikarni@gmail.com> | 2017-03-13 18:41:59 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 18:41:59 -0300 |
commit | 99a6a41ffea6de9e4b3df43265282d76c3391fd1 (patch) | |
tree | 2b4d7b3c5ebd267ad252ab05c440a90033e4f962 /web-ui/src/common/util.js | |
parent | 8595d3d4f31b761574c08d6f9cdf5bfc00f53a99 (diff) | |
parent | 412d95d64b5d26d4f5e00a85b7b62da23e9bb168 (diff) |
Merge branch 'master' into makefile-tests
Diffstat (limited to 'web-ui/src/common/util.js')
-rw-r--r-- | web-ui/src/common/util.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/web-ui/src/common/util.js b/web-ui/src/common/util.js new file mode 100644 index 00000000..effb3d9c --- /dev/null +++ b/web-ui/src/common/util.js @@ -0,0 +1,8 @@ +export const hasQueryParameter = (param) => { + const decodedUri = decodeURIComponent(window.location.search.substring(1)); + return !(decodedUri.split('&').indexOf(param) < 0); +}; + +export default { + hasQueryParameter +}; |