I have a button that is performing a get to my page and adding a filter to the query string. My code applies that filter to the grid...but the user can remove/edit that fil
// load built-in utilities for URL resolution and parsing
var url = require('url');
function removeQueryString(url){
// split url into distinct parts
// (full list: https://nodejs.org/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost)
var obj = url.parse(url);
// remove the querystring
obj.search = obj.query = "";
// reassemble the url
return url.format(obj);
}