[whatwg/url] Proposal: Functional chaining on URLSearchParams (Issue #756)

It would be good to allow functional chaining of methods on URLSearchParams

Today to chain operations like sort() and toString() we have to do the following

```
const url = new URLSearchParams('?b=23&c=12&a=asdf');
url.sort();
console.log(url.toString());
```

The ideal state would be to be able to do the following in various scenarios:

```
console.log(new URLSearchParams('?b=23&c=12&a=asdf').sort().toString());
-- or --
const url = new URLSearchParams('?b=23&c=12&a=asdf');
console.log(url.sort().toString());
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/756
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/756@github.com>

Received on Thursday, 23 February 2023 15:18:07 UTC