Skip to content

WhatWG URL provides no suitable replacement for url.format() #25099

Closed
@Fishrock123

Description

@Fishrock123

Users have used url.format() for as long as I can remember. It is useful, reasonably ergonomic, has has existed for public use for over 7 years...

The WhatWG url alternative is absolutely not ergonomic or obvious:

String(Object.assign(new URL('<a url>'), {pathname: '/foo'}))

I do not agree that deprecating url.format() with no such API alternative is acceptable.
The deprecation was done in #22715

Metadata

Metadata

Assignees

No one assigned

    Labels

    urlIssues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions