MCPcopy Create free account
hub / github.com/sindresorhus/query-string / getHash

Function getHash

base.js:442–450  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

440}
441
442function getHash(url) {
443 let hash = '';
444 const hashStart = url.indexOf('#');
445 if (hashStart !== -1) {
446 hash = url.slice(hashStart);
447 }
448
449 return hash;
450}
451
452function getUrlWithoutQuery(url) {
453 // Avoid `split('?')` so query-heavy URLs don't allocate large arrays.

Callers 2

stringifyUrlFunction · 0.85
pickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected