Skip to main content
MIMEParams.prototype.set - node__util.d.ts - Node documentation
method MIMEParams.prototype.set

Usage in Deno

```typescript import { MIMEParams } from "node:node__util.d.ts"; ```
MIMEParams.prototype.set(
name: string,
value: string,
): void
Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, set the first such pair's value to `value`. ```js import { MIMEType } from 'node:util'; const { params } = new MIMEType('text/plain;foo=0;bar=1'); params.set('foo', 'def'); params.set('baz', 'xyz'); console.log(params.toString()); // Prints: foo=def;bar=1;baz=xyz ```

Parameters

name: string
value: string

Return Type

void