Skip to content

Support repeated names #206

@Janpot

Description

@Janpot

https://url.spec.whatwg.org/commit-snapshots/31ddc5bd0c4ca1b6d837029c926ec87bc472c168/#example-constructing-urlsearchparams

Otherwise, if init is a record, then for each mapping (name, value) in init, append a new name-value pair whose name is name and value is value, to query’s list.

I propose to also add support for multiple values

new URLSearchParams({ x: ['1', '2'], y: 3 });
// x=1&x=2&y=3

Basically: when value is an array, for each item in that array, add a new name-value pair whose name is name and value is that item

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions