Open this example in the interactive library
Source code
import { URLSearchParams } from "node:url";
console.log(new URLSearchParams("page=2").has("page", "2"));
Sample output
true

Open this example in the interactive library
import { URLSearchParams } from "node:url";
console.log(new URLSearchParams("page=2").has("page", "2"));
true