[openstreetmap/openstreetmap-website] Replace qs with URLSearchParams (PR #5592)
Anton Khorev
notifications at github.com
Sun Feb 2 16:50:44 UTC 2025
@AntonKhorev commented on this pull request.
> + function stringifyArgs(args) {
+ return new URLSearchParams(args).toString();
+ }
+
Is this function required? You can replace
```js
OSM.router.route("/directions?" + stringifyArgs({
...
```
with
```js
OSM.router.route("/directions?" + new URLSearchParams({
...
```
and this will work because string coercion runs `toString`.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5592#pullrequestreview-2588593625
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5592/review/2588593625 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250202/7410fe54/attachment.htm>
More information about the rails-dev
mailing list