Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/xdg/vendor/types/deno.d.ts>URLSearchParams#forEach

Determine XDG Base Directory paths (OS/platform portable)
Go to Latest
method URLSearchParams.prototype.forEach
import { URLSearchParams } from "https://deno.land/x/xdg@v10.3.0/vendor/types/deno.d.ts";

Calls a function for each element contained in this object in place and return undefined. Optionally accepts an object to use as this when executing callback as second argument.

const params = new URLSearchParams([["a", "b"], ["c", "d"]]);
params.forEach((value, key, parent) => {
  console.log(value, key, parent);
});

Parameters

callbackfn: (
value: string,
key: string,
parent: this,
) => void
optional
thisArg: any