Skip to content

delete() and "?" #97

@stevenvachon

Description

@stevenvachon
const nativeURL = require("url").URL;
const shimmedURL = require("whatwg-url").URL;

const native = new nativeURL("http://host/?param");
native.searchParams.delete("param");
native.href;
//-> http://host/

const shimmed = new shimmedURL("http://host/?param");
shimmed.searchParams.delete("param");
shimmed.href;
//-> http://host/?

Pretty sure that the native one is correct. @TimothyGu ?

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