MCPcopy
hub / github.com/sindresorhus/query-string / getHash

Function getHash

base.js:299–307  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

297}
298
299function getHash(url) {
300 let hash = '';
301 const hashStart = url.indexOf('#');
302 if (hashStart !== -1) {
303 hash = url.slice(hashStart);
304 }
305
306 return hash;
307}
308
309function getUrlWithoutQuery(url) {
310 // Avoid `split('?')` so query-heavy URLs don't allocate large arrays.

Callers 1

stringifyUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…