Skip to main content
Module

x/deno/js/url_search_params.ts>URLSearchParams#set

A modern runtime for JavaScript and TypeScript.
Go to Latest
method URLSearchParams.prototype.set
import { URLSearchParams } from "https://deno.land/x/deno@v0.1.12/js/url_search_params.ts";

Sets the value associated with a given search parameter to the given value. If there were several matching values, this method deletes the others. If the search parameter doesn't exist, this method creates it.

  searchParams.set('name', 'value');

Parameters

name: string
value: string