diff options
author | Anike Arni <aarni@thoughtworks.com> | 2017-02-23 17:50:56 -0300 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2017-02-23 17:50:56 -0300 |
commit | fb4630207d86d39ea05dd679b2724be87597c518 (patch) | |
tree | 0573b4e7c18c88742a6cbecfceba009c3dbb4c34 /web-ui/src/common/util.js | |
parent | de14bb0376d5b0ed511e52251a7c0e6cc38c39eb (diff) |
[#907] Moves i18n and util files to common directory
with @thaissiqueira
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 +}; |