MforEach
Bun

method

URLSearchParams.forEach

callbackfn: (value: string, key: string, parent: URLSearchParams) => void,
thisArg?: any
): void;

Iterates over each name-value pair in the query and invokes the given function.

const myURL = new URL('https://example.org/?a=b&c=d');
myURL.searchParams.forEach((value, name, searchParams) => {
  console.log(name, value, myURL.searchParams === searchParams);
});
// Prints:
//   a b true
//   c d true
@param callbackfn

Invoked for each name-value pair in the query

@param thisArg

To be used as this value for when fn is called