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

Function getUrlWithoutQuery

base.js:452–456  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

450}
451
452function getUrlWithoutQuery(url) {
453 // Avoid `split('?')` so query-heavy URLs don't allocate large arrays.
454 const queryStart = url.indexOf('?');
455 return queryStart === -1 ? url : url.slice(0, queryStart);
456}
457
458function parseValue(value, options, type) {
459 if (type === 'string' && typeof value === 'string') {

Callers 2

parseUrlFunction · 0.85
stringifyUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected