(url, options)
| 532 | } |
| 533 | |
| 534 | export function parseUrl(url, options) { |
| 535 | options = { |
| 536 | decode: true, |
| 537 | ...options, |
| 538 | }; |
| 539 | |
| 540 | let [url_, hash] = splitOnFirst(url, '#'); |
| 541 | |
| 542 | if (url_ === undefined) { |
| 543 | url_ = url; |
| 544 | } |
| 545 | |
| 546 | return { |
| 547 | url: getUrlWithoutQuery(url_ ?? ''), |
| 548 | query: parse(extract(url), options), |
| 549 | ...(options && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}), |
| 550 | }; |
| 551 | } |
| 552 | |
| 553 | export function stringifyUrl(object, options) { |
| 554 | options = { |
no test coverage detected
searching dependent graphs…