function searchPath () {
  var url = window.location.href
  var u = url.indexOf('?')
  return u === -1 ? '' : url.slice(u, -1)
}
/**
 * Return the search path for the page
 * This is preferable to window.location.search because SPAs
 * can have a # in the url which will include the query param in
 * the hash
 *
 * @return {string}
 */
Return the search path for the page
This is preferable to window.location.search because SPAs
can have a # in the url which will include the query param in
the hash

@return {string}
Return the search path for the page This is preferable to window . location . search because SPAs can have a # in the url which will include the query param in the hash @return { string }
function searchPath () {
  var url = window.location.href
  var u = url.indexOf('?')
  return u === -1 ? '' : url.slice(u, -1)
}
function searchPath ( ) { var url = window . location . href var u = url . indexOf ( '?' ) return u === - 1 ? '' : url . slice ( u , - 1 ) }
Return the search path for the page
 This is preferable to window.location.search because SPAs
 can have a # in the url which will include the query param in
 the hash
Return the search path for the page This is preferable to window . location . search because SPAs can have a # in the url which will include the query param in the hash