(key)
| 38 | } |
| 39 | |
| 40 | function getQueryParam(key) { |
| 41 | var pattern = new RegExp(key + '=([^&]+)(&|$)'); |
| 42 | var matches = window.location.search.match(pattern); |
| 43 | |
| 44 | if (matches) { |
| 45 | return decodeURIComponent(matches[1]); |
| 46 | } |
| 47 | |
| 48 | handleError(new Error('No key found for' + key)); |
| 49 | } |
| 50 | |
| 51 | function getBooleanQueryParam(key) { |
| 52 | return getQueryParam(key) === 'true'; |
no test coverage detected