Skip to content

URLSearchParams.appendAll(iterable) #461

Open
@ethanresnick

Description

@ethanresnick

This is a feature request for the functionality mentioned in the title. (Hopefully this is the right place for such requests.) Basically, it'd be really nice to be able to merge a bunch of items into a URL's existing query string, without having to do an explicit loop and call append on each iteration, hence something like:

const newParams = { a: true, b: false };
const url = new URL(inputUrl);
url.serachParams.appendAll(Object.entries(newParams));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions