(groupings)
| 118 | } |
| 119 | |
| 120 | function generateGroupings(groupings) { |
| 121 | if (!groupings) { |
| 122 | return ''; |
| 123 | } |
| 124 | return Object.keys(groupings) |
| 125 | .map( |
| 126 | key => |
| 127 | `/${encodeURIComponent(key)}/${encodeURIComponent(groupings[key])}`, |
| 128 | ) |
| 129 | .join(''); |
| 130 | } |
| 131 | |
| 132 | function isHttps(href) { |
| 133 | return href.search(/^https/) !== -1; |