function paramsReplace(param) {
  /* replace URL with history API */
  if (window.history && window.history.replaceState) {
    const url = window.location.href
    const cleanUrl = paramsClean(url, param)
    if (url !== cleanUrl) {
      // eslint-disable-next-line no-restricted-globals
      history.replaceState({}, '', cleanUrl)
    }
  }
}
Removes params from URL in browser
@param  {string|RegExp} param - parameter to replace. String or regex pattern