MCPcopy
hub / github.com/mthenw/frontail / _setFilterParam

Function _setFilterParam

web/assets/app.js:142–152  ·  view source on GitHub ↗
(value, uri)

Source from the content-addressed store, hash-verified

140 * @private
141 */
142 var _setFilterParam = function(value, uri) {
143 var _url = new URL(uri);
144 var _params = new URLSearchParams(_url.search.slice(1));
145 if (value === '') {
146 _params.delete('filter');
147 } else {
148 _params.set('filter', value);
149 }
150 _url.search = _params.toString();
151 window.history.replaceState(null, document.title, _url.toString());
152 };
153
154 /**
155 * @return void

Callers 1

app.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected