Sindbad~EG File Manager

Current Path : /var/www/html/amopropiedades.com/wp-content/plugins/leadin/scripts/utils/
Upload File :
Current File : /var/www/html/amopropiedades.com/wp-content/plugins/leadin/scripts/utils/queryParams.ts

export function addQueryObjectToUrl(
  urlObject: URL,
  queryParams: { [key: string]: any }
) {
  Object.keys(queryParams).forEach(key => {
    urlObject.searchParams.append(key, queryParams[key]);
  });
}

export function removeQueryParamFromLocation(key: string) {
  const location = new URL(window.location.href);
  location.searchParams.delete(key);
  window.history.replaceState(null, '', location.href);
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists