(params = makeMap(), state = null)
| 33 | })(); |
| 34 | |
| 35 | export function buildUrlQuery(params = makeMap(), state = null) { |
| 36 | // Attach the time travel timestamp to every request to the backend. |
| 37 | if (state) { |
| 38 | params = params.set('timestamp', state.get('pausedAt')); |
| 39 | } |
| 40 | |
| 41 | // Ignore the entries with values `null` or `undefined`. |
| 42 | return params.map((value, param) => { |
| 43 | if (value === undefined || value === null) return null; |
| 44 | if (List.isList(value)) { |
| 45 | value = value.join(','); |
| 46 | } |
| 47 | return `${param}=${value}`; |
| 48 | }).filter(s => s).join('&'); |
| 49 | } |
| 50 | |
| 51 | export function basePath(urlPath) { |
| 52 | // |
no test coverage detected
searching dependent graphs…